1. Introduction
Currently, the food industry is moving towards digitalization within the framework of Industry 4.0. One of the main directions of this change is the development of digital representations for production processes that allow efficient monitoring and management of technological systems [
1,
2,
3]. These digital representations make it possible to create virtual copies of physical processes and support repeated analysis and decision-making [
4,
5,
6]. In addition, many existing digital twin models are still based on deterministic approaches. Such models often fail to reflect the stochastic nature of real systems, especially in bioprocesses where stochastic variability plays an important role [
5,
6,
7]. In this context, integrating Markov chain models into digital twin applications opens up new opportunities, as it allows more efficient consideration of the probabilistic behavior of the system [
3,
8].
The concept of the digital twin has evolved significantly with the rapid development of Industry 4.0, the Internet of Things (IoT), big data, and artificial intelligence technologies, enabling widespread applications in industrial and bioprocess systems [
3,
4,
5]. A digital twin is a virtual copy of a physical system [
3]. Digital twin technologies enable the integration of physical and virtual systems through continuous data acquisition, simulation, and predictive analysis. Recent studies have demonstrated their application in manufacturing, biological systems, and bioprocess engineering for process monitoring, optimization, and decision support [
3,
4,
5,
6,
9]. Grimstad et al. [
10] and Krupitzer et al. [
11] considered digital twins for maintenance. As for the bioprocess technology, De Giacomo et al. [
1] linked Markov decision-making processes with digital twins, and Ray et al. [
12] linked artificial intelligence with yogurt fermentation.
The dairy industry is one of the industries that is actively involved in digital transformation. Ayran is a dairy product containing probiotics. An important object for such studies is the traditional low-viscosity fermented milk product, which is currently widely used in Central Asia and the Middle East [
13,
14]. The fermentation stage is the key stage in the production of ayran and involves complex biochemical processes. The quality of the product during fermentation is determined, first of all, by the pH dynamics, which depends on the permeability of microbes, the composition of raw materials and the course of processing. Even minor changes in this process can lead to instability or product defects [
15,
16]. In recent years, several studies have focused on the microbiological and technological characteristics of Kazakhstani ayran [
14]. Abilkhadirov et al. reported that traditional Kazakh ayran contains unique strains of Lactobacillus and Bifidobacteria with high probiotic potential [
17]. Shalabi et al. examined the microstructure and rheological properties of ayran produced using commercial starter cultures and reported a correlation between starter culture composition and the viscosity of the final product [
18]. These findings indicate the need for specialized and adapted ayran fermentation control systems that consider the microbiological and physicochemical characteristics of traditional ayran [
14,
17,
18].
From an industrial perspective, the proposed metric holds direct relevance for the dairy sector of Kazakhstan and other Central Asian countries, where traditional fermented products such as ayran and related dairy beverages remain important components of food production. Maintaining consistent product quality during fermentation is challenging because pH dynamics are affected by microbial activity, raw material variability, and environmental conditions. In many small- and medium-scale production facilities, process supervision still relies largely on periodic measurements and operator experience. The Reliability Reserve metric introduced in this study provides an interpretable estimate of the remaining intervention time before the process reaches an undesirable over-acidification state. When integrated into a digital twin framework, this indicator can support proactive process management, reduce product losses caused by fermentation deviations, improve batch-to-batch consistency, and facilitate the future adoption of predictive control technologies in industrial dairy fermentation systems.
In Kazakhstan, fermented dairy products constitute a significant segment of the dairy market. According to the Bureau of National Statistics, the provision of domestic production for yogurt, kefir, and other fermented products reached 84% in 2023 [
19]. The total volume of fermented (cultured) products produced in Kazakhstan amounted to 231,693 tons in 2023 [
19], while yogurt and fermented milk production grew by 4% in 2024 [
20].
However, the dairy industry faces significant challenges. Only 20% of produced raw milk complies with the technical regulations of the Customs Union [
21], and dairy processing enterprises are loaded with raw materials at only 77% of their capacity [
22]. The milk processing rate is only 33% [
23], indicating substantial inefficiencies in the production chain. Furthermore, the industry suffers from low profitability: low prices for dairy products and high production costs limit the ability of farmers and producers to generate adequate returns [
24]. The annual economic loss in the meat and dairy sector is estimated at approximately
$800 million [
23].
The proposed Reliability Reserve metric aims to reduce quality-related losses and improve process efficiency by providing operators with a predictive intervention tool.
Three main approaches are used to model the fermentation of dairy products. Kinetic models based on logistic functions and the Gompertz model describe the average course of fermentation but do not account for stochastic variability [
25,
26]. Machine learning methods (neural networks, gradient boosting) show high accuracy in predicting pH changes [
27,
28]; however, the disadvantage is the “black box” principle and the difficulty of interpreting the results [
29]. Hybrid models combine the advantages of both approaches. Kennedy and O’Hagan [
27] developed Bayesian calibration methods, while Rasmussen and Williams [
30] proposed Gaussian processes. pH monitoring is crucial in the dairy industry. Aydogdu et al. [
15] examined the basics of pH, Arango et al. [
31] investigated the inline observation method using infrared sensors, while Muncan et al. studied real-time observation using infrared spectroscopy [
32].
Continuous time in the network of chemical reactions is described by the Markov chains [
8,
33]. However, Anderson and Kurtz [
8] applied them to chemical reactions, and Fearnhead et al. [
33] developed an applied forecast. In technical systems, the Markov model has become a standard tool for assessing reliability and predicting failures [
10]. For example, Grimstad et al. [
10] developed a danger and risk-based maintenance method. The same approach has also found successful application in agriculture: Markov chains are used to predict dairy cow diseases with 85–92% accuracy [
34], to model lactation curves [
35], and to determine the expected calving time with an accuracy of 89% [
36].
Despite the proven effectiveness of Markov chains in modeling biological systems such as dairy cow disease prediction [
34], lactation curve analysis [
35], and calving time estimation [
36], their application to dairy product fermentation processes—particularly traditional fermented milk products such as ayran—remains largely unexplored. Most fermentation studies rely on deterministic kinetic models [
25,
26] or machine-learning approaches [
28,
30,
37], whereas probabilistic state-transition frameworks have received comparatively little attention. Recent advances in smart fermentation technologies have demonstrated the value of real-time monitoring and predictive process management [
38]. However, no previous study has proposed a Markov-derived indicator specifically designed to quantify the remaining operator intervention window during fermentation. The present study addresses this gap by applying a discrete-time Markov chain framework to ayran fermentation and introducing the Reliability Reserve as an interpretable and actionable metric for real-time process control.
Despite the considerable progress made in modeling fermentation processes, existing methods still have important limitations. Traditional kinetic models describe only the average behavior of the system and do not take into account its stochastic variability [
25,
26]. Machine learning techniques, while offering high predictive accuracy, are often difficult to interpret because of their “black-box” nature [
27,
37]. Most importantly, there is still no widely accepted metric that could provide operators with clear, real-time information about how much time remains for intervention while the process is in the target state. This gap is especially important for traditional fermented milk products such as ayran, where batch-to-batch variability and region-specific microbiological characteristics confirm the need for flexible, adaptive controls [
14,
17].
In the course of the literature review, three main research gaps were identified. First, although Markov chains have been successfully used in the study of various biological systems [
34,
35,
36], they have not yet been used to simulate state transitions in the ayran fermentation process. In addition, studies have shown that Kazakhstan Ayran has unique microbiological characteristics that require modeling techniques specific to the product [
14,
17,
18]. Second, existing modeling methods are purely deterministic [
25,
26] or “black box” machine learning methods [
28,
37], while hybrid approaches that combine physical principles with reliability theory remain largely undeveloped [
29,
30]. Thirdly, there is still no practical indicator that can provide operators with accurate, real-time information about the remaining time that can be intervened when the fermentation process is in the target state [
1,
12].
This study develops and tests the Reliability Reserve (τ) based on discrete-time Markov chains to fill these gaps. The proposed approach consists of reducing the pH trajectory to five different states, creating individual Markov chains for each of the three groups, calculating the probability of transition from the target state S
4 to the acidification state S
5 (P
45), and obtaining the available mixing time using the analytical expression τ = −Δt/ln(1 − P
45) [
10].
The research work consists of the following sections.
Section 2 describes the model and method,
Section 3 shows the results of the study,
Section 4 provides a discussion,
Section 5 presents the conclusions and directions of future research.
3. Results
3.4. Sensitivity Analysis and Bootstrap Validation
Sensitivity analysis and load bar testing were performed to assess the reliability of the identified results. During the analysis, the boundaries of the state ranges were changed by ±0.05 pH, and a change in the P
45 value was observed. The results of the sensitivity analysis are summarized in
Table 6.
Sensitivity analysis was performed by systematically shifting the pH state boundaries by ±0.05 pH units. In all groups, the change in P
45 did not exceed 8%, indicating that the results were stable and robust. In the Control group, the reserve ranged from 27.9 to 32.4 min. The number of observations in state S4 and the corresponding 95% confidence intervals are summarized in
Table 7.
The Control group included 24 points and had a confidence interval of ±0.032, whereas the Opt2 group had only 18 points and therefore a wider interval of ±0.045.
The graph shows P
45 values for Control, Opt1 and Opt2 groups with Control, functional additives without impurities at the base level (0.00) and after boundary shifts of −0.05 and +0.05 pH. The variation is no more than 8% for all groups, which confirms the reliability of the model. The results of the sensitivity analysis are illustrated in
Figure 8.
The black numbers indicate the baseline P45 values, whereas the red and green numbers represent the lower (−0.05 pH) and upper (+0.05 pH) boundary-shift results obtained from the sensitivity analysis, respectively.
Table 8 shows the number of time points corresponding to the S4 State for each group and the 95% confidence intervals calculated for the P
45 transition probability.
The bootstrap-derived 95% confidence intervals for the estimated P
45 values are presented in
Figure 9.
Error lines mean 95% confidence intervals. For the Control group (n = 24), the value was 0.200 ± 0.032. For Opt1 (n = 20) and Opt2 (n = 18), the values were 0.250 ± 0.042 and 0.250 ± 0.045, respectively.
For Opt2, a wider interval indicates a smaller number of points in state S4.
Bootstrap validation:
No assessment of the reliability of the probability of transmission of the Markov chain method was used. For each group, 1000 bootstrap resamples were created to estimate the P45 distribution. This method is particularly important for improving the accuracy of statistical estimates due to the small number of points in state S4 (18–24 points).
We obtained the results of the bootstrap analysis, which showed the stability of the P
45 values. To further evaluate the robustness of the estimated transition probabilities, bootstrap analysis was performed, and the corresponding statistical results are presented in
Table 9.
In all groups, the baseline P45 values are close to the bootstrap mean values and fall within the 95% confidence intervals. This confirms the statistical stability and reliability of the results obtained. The wider confidence interval in the Opt2 group (18%) is explained by the smaller number of points (n = 18).
5. Conclusions
In this study, a new indicator called the Reliability Reserve (τ) was proposed to support operator decision-making during the ayran fermentation process. The results show that this approach can also be integrated into digital twin systems for predictive management. The research objectives were achieved by combining experimental data, mathematical modeling, and statistical analysis.
The fermentation process was represented using five pH-based states (S1–S5), and discrete-time Markov chains were constructed for three groups: Control, Opt1 (3% additive), and Opt2 (4% additive). To obtain a more detailed time representation, the experimental data (2–10 h) were interpolated with a step of 0.1 h, resulting in 101 time points for each group.
The results obtained clearly show that in the Control group, the probability of transition from the target state of S4 to the state of over-acidification of S5 (P45) was 0.200, which corresponds to a reserve time of 26.9 min. In the Opt1 and Opt2 groups, this probability increased to 0.250, and the Reliability Reserve decreased to 20.9 min. In practice, these additives accelerate fermentation, but reduce the time required for operator intervention by about 6 min.
The reliability of the study results was confirmed by sensitivity analysis and bootstrap verification (1000 repetitions). A change in the boundaries of the state within ±0.05 pH led to less than 8% of the deviation of P45. It was also shown that the calculated confidence intervals (±0.032, ±0.042, and ±0.045) provide a stable assessment of the model even with a limited number of observations in the S4 state.
The obtained results indicate that the proposed Reliability Reserve metric reflects the dynamics of the fermentation process and provides an interpretable indicator for operator decision support. Groups with higher transition probabilities (P45) exhibited shorter intervention windows (τ), demonstrating the sensitivity of the proposed approach to changes in fermentation behavior. These findings support the applicability of the Reliability Reserve concept for real-time monitoring and future digital twin integration in dairy fermentation systems.
From a practical point of view, the proposed indicator can be used not only for monitoring but also for management. If the τ value falls below a critical threshold (e.g., 10 min), corrective actions such as temperature adjustment may be recommended within a digital twin framework. This may help restore the process before unfavorable conditions are reached and reduce the need for operator intervention.
Several limitations should be acknowledged. First, the state determination is based only on pH measurements, where potentially influencing parameters such as temperature dynamics and LAB concentration are not taken into account. Second, although the dataset is sufficiently provided for the Markov model, it is limited to 101 time points per group and three experimental batches. Third, the assumption of stability and homogeneity in Markov chains, although confirmed in experimental conditions, may not be observed in different production conditions.
In the future, the work to be done should be aimed at extending the model, introducing several parameters, increasing the amount of experimental data, and testing non-stationary Markov approaches. It is also important to test the proposed method in specific production conditions sites.
To summarize, the Reliability Reserve represents a meaningful advancement in bioprocess monitoring by providing a mathematically rigorous yet practically interpretable indicator for real-time operator support. Its successful application was demonstrated using experimental fermentation data, and the proposed metric can be readily integrated into digital twin architectures for dairy production. The approach supports the transition from passive monitoring to predictive decision support, enabling earlier intervention and improved process management. Consequently, the proposed method contributes to maintaining product quality and improving the efficiency of fermentation control.