Provide your details below to request scholarly review comments.
×
Verified Request System ®
Order Article Reprints
Please fill in the form below to order high-quality article reprints.
×
Scholarly Reprints Division ®
− Abstract
In this study, bifurcation analysis and multi-objective nonlinear model predictive control are performed on a mastitis dynamic model . Bifurcation analysis is a powerful mathematical tool used to deal with the nonlinear dynamics of any process. Several factors must be considered, and multiple objectives must be met simultaneously. The MATLAB program MATCONT was used to perform the bifurcation analysis. The MNLMPC calculations were performed using the optimization language PYOMO in conjunction with the state-of-the-art global optimization solvers IPOPT and BARON. The bifurcation analysis revealed a branch point. The MNLMC converged on the Utopia solution. The branch point (which causes multiple steady-state solutions from a singular point) is very beneficial because it enables the Multiobjective nonlinear model predictive control calculations to converge to the Utopia point (the best possible solution) in the model.
− Explore Digital Article Text
# I. BACKGROUND
Mastitis is an inflammatory condition of the mammary gland that affects both humans and animals, particularly dairy cattle, and is a significant concern in veterinary and human medicine. The condition can occur as a result of infection, physical injury, or other irritations to the mammary tissue. In dairy cows, mastitis is among the most costly and prevalent diseases, leading to reduced milk production, alterations in milk composition, and economic losses for farmers. In humans, mastitis most often affects lactating women, a condition known as lactational mastitis, though it can also occur in non-lactating individuals. Understanding mastitis involves examining its causes, symptoms, diagnosis, treatment, prevention, and impact on public health and the agricultural economy.
Mastitis is primarily caused by bacterial infection. The most common pathogens include Staphylococcus aureus, Streptococcus agalactiae, Streptococcus uberis, and Escherichia coli. These bacteria can enter the mammary gland through the teat canal, especially when the natural defense barriers of the udder are compromised. Factors such as poor milking hygiene, mechanical injuries, improper milking machine maintenance, or environmental exposure to contaminated bedding can facilitate bacterial entry. Once inside the mammary gland, the bacteria multiply and trigger an immune response, leading to inflammation, swelling, pain, and altered milk secretion. In some cases, fungi, viruses, or mycoplasmas can also be involved, although bacterial infections remain the predominant cause.
In dairy cattle, mastitis is typically classified into two forms: clinical and subclinical. Clinical mastitis is easily recognizable because of visible signs in the udder and milk. The affected quarter of the udder becomes swollen, hot, painful, and sometimes hard. The milk may appear watery, clotted, or contain flakes and pus. The cow might show systemic symptoms such as fever, reduced appetite, and decreased milk yield. Subclinical mastitis, on the other hand, is more insidious and often goes unnoticed because there are no visible symptoms. However, it leads to reduced milk production and altered milk composition. Subclinical mastitis can persist for long periods and serve as a reservoir of infection, spreading pathogens to other cows through milking equipment or handlers. Because of its hidden nature, subclinical mastitis is often more economically damaging than the clinical form.
In humans, mastitis most commonly occurs in breastfeeding women, usually within the first few weeks after childbirth. This form of mastitis, known as lactational or puerperal mastitis, results from milk stasis – the accumulation of milk within the breast due to infrequent feeding, poor latch, or blocked ducts. The stagnant milk serves as a medium for bacterial growth, often involving Staphylococcus aureus or Streptococcus species. The condition presents with breast pain, swelling, redness, warmth, and fever. In severe cases, abscess formation can occur if the infection is not promptly treated. Non-lactational mastitis can also affect women or men and may be associated with smoking, nipple piercing, or underlying conditions such as duct ectasia or diabetes.
Diagnosis of mastitis involves clinical examination and laboratory analysis of milk or tissue samples. In dairy cows, the California Mastitis Test (CMT) is commonly used as a rapid, on-farm diagnostic tool to detect subclinical cases. This test measures the somatic cell count (SCC) — a key indicator of udder inflammation — in the milk. A high SCC reflects the presence of immune cells responding to infection. For more definitive diagnosis, bacteriological culture and antibiotic sensitivity testing can identify the causative organisms and guide treatment decisions. In human mastitis, diagnosis is usually based on symptoms and physical examination, though ultrasound or aspiration may be used to rule out abscess formation.
Treatment of mastitis depends on the cause and severity of the condition. In dairy cattle, antibiotic therapy is the most common approach, often administered through intramammary infusion. The choice of antibiotic must consider the causative bacteria, the severity of infection, and milk withdrawal periods to prevent antibiotic residues in milk intended for human consumption. In addition to antibiotics, supportive therapies such as anti-inflammatory drugs, frequent milking, and proper hydration help reduce inflammation and restore milk flow. In human cases, management involves continued breastfeeding or milk expression to relieve engorgement, along with antibiotic therapy if infection is suspected. Pain relief through warm compresses, gentle massage, and rest are also recommended. If an abscess forms, surgical drainage may be necessary.
Prevention of mastitis is far more effective and economical than treatment. In dairy herds, mastitis control programs focus on hygiene, proper milking procedures, and herd management. Key preventive measures include maintaining clean milking equipment, using pre- and post-milking teat disinfectants, ensuring good cow housing conditions, and promptly treating any teat injuries. Cows with chronic or recurrent mastitis may need to be culled to prevent spreading infection. Regular monitoring of somatic cell counts and routine screening using tests like the CMT can help identify and control subclinical cases early. In humans, prevention focuses on ensuring proper breastfeeding techniques, frequent feeding to prevent milk stasis, and maintaining nipple hygiene.
The economic and public health implications of mastitis are substantial. In the dairy industry, mastitis leads to direct losses from decreased milk yield and quality, veterinary costs, and discarded milk due to antibiotic contamination. Indirect losses include reduced reproductive efficiency, premature culling of affected cows, and the cost of implementing control programs. Mastitis also affects milk composition by reducing fat, lactose, and casein content, which in turn lowers its suitability for processing into dairy products such as cheese and yogurt. On a global scale, mastitis contributes to significant financial losses running into billions of dollars annually. For human health, although lactational mastitis is generally treatable, it can cause significant discomfort, psychological distress, and interruption of breastfeeding, affecting both mother and infant nutrition.
Recent research in mastitis management has focused on developing alternative therapies and improving diagnostic tools. With growing concerns over antibiotic resistance, scientists are exploring non-antibiotic approaches such as vaccines, probiotics, bacteriophages, and herbal remedies. Vaccines against Staphylococcus aureus and E. coli have shown promise in reducing the incidence and severity of infection, though they are not yet universally effective. The use of automated milking systems and data-driven herd management has also enhanced early detection and control of mastitis. Advances in molecular biology have enabled rapid identification of pathogens through polymerase chain reaction (PCR) and other genomic tools, providing faster and more precise diagnostic capabilities.
Mastitis is a multifactorial disease that remains a major concern in both animal and human health. It involves complex interactions between pathogens, host defenses, and environmental factors. While it is most often associated with bacterial infection, underlying management practices and hygiene conditions play a critical role in determining susceptibility. Effective control and prevention require a comprehensive approach that combines good husbandry, prompt detection, appropriate treatment, and ongoing research into new solutions. For the dairy industry, maintaining udder health is essential not only for economic sustainability but also for ensuring the quality and safety of milk. In human health, timely management of mastitis ensures continued breastfeeding, maternal well-being, and infant nutrition. Despite advances in understanding and technology, mastitis continues to challenge veterinarians, farmers, and healthcare providers, underscoring the need for continued vigilance and innovation in its control.
Lam et al (1996)[1] used mathematical models to estimate the efficacy of post-milking teat disinfection in split-udder trials of dairy cows. Cherry et al (1998)[2] evaluated the bovine viral diarrhea virus control using a mathematical model of infection dynamics. Hamann (2005)[3] discussed the diagnosis of Mastitis and Indicators of milk quality. Dorte et al (2010)[4] modelled the dynamics of intramammary E. coli infections in dairy cows. Michelle et al (2016)[5] modelled antimicrobial resistance in agricultural waste. Cobirka et al (2020)[6] researched the epidemiology and classification of mastitis. Abera (2020)[7], did a review on the prevalence and associated risk factors of bovine mastitis in lactating cows of smallholder dairy farms in Ethiopia. Izneid et al. (2023)[8] developed an optimal control strategy for a mathematical model of mastitis dynamics.
This work aims to perform bifurcation analysis and multiobjective nonlinear control (MNLMPC) studies on a Mastitis dynamic model described in Izneid et al (2023)[8]. The paper is organized as follows. First, the model equations are presented, followed by a discussion of the numerical techniques involving bifurcation analysis and multiobjective nonlinear model predictive control (MNLMPC). The results are then presented, followed by the discussion and conclusions.
# II. MODEL EQUATIONS
The bacteria population is represented by bv. The cattle populations are divided into four classes: the susceptible class (sv), subclinical class (cs), which includes active cattle that do not produce noticeable symptoms of mastitis, clinical class (cv); which represents all cattle that are showing the symptoms of mastitis, and the recovered class (rv).
$\gamma$ is the ingestion rate, and K is the concentration of Staphylococcus and Streptococcus bacteria in the environment. p represents the probability of the susceptible cattle becoming clinically infected. The subclinical cattle develop mastitis and join the clinical class at a rate $\phi$ and others join the recovered class at a rate $\theta$. The rate at which the cattle go from clinical to recovered class is $\delta$ . $\xi, \mu$ are the disease-induced mortality rate and the natural death rate of the individuals.
The subclinical/clinical cattle population increases the bacteria in the environment at a rate $\beta_1, \beta_2$. $\mu_b$ represents the bacteria's death rate. The control parameters u1, u2, and u3 represent the preventive measures, the screening of subclinical individuals, and the treatment of clinical individuals. The model equations are
$$
\lambda = \frac {b_v (\gamma)}{(k + b_v)}
$$
$$
\frac {d (s_v)}{d t} = \pi + \alpha (r_v) - (1 - u1)(\lambda) s_v - \mu (s_v)
$$
$$
\frac {d (c_s)}{d t} = (1 - u1) (1 - p) \lambda (s_v) - (u2 + \phi) c_s - (\theta + \beta_1 + \mu + \xi) c_s
$$
$$
\frac {d (c_v)}{d t} = (1 - u1) (p) \lambda (s_v) + (1 - u2) \phi (c_s) - (u3 + \delta) c_v - (\beta_2 + \mu + \xi) c_v
$$
$$
\frac {d (r_v)}{d t} = \theta (c_s) + (u2 + \delta) c_v - (\alpha + \mu) r_v
$$
$$
\frac {d (b_v)}{d t} = \beta_1 (c_s) + \beta_2 (c_v) - \mu_b (b_v)
$$
The base parameters are $\pi = 500$ ; $\mu = 0.02$ ; $\alpha = 0.99$ ; $\gamma = 0.09$ ; p=0.6; k=1000; $\xi = 0.9992$ ;
$$
\delta = 0.998; \phi = 0.999; \theta = 0.98; \beta_1 = 0.009; \beta_2 = 0.008; \mu_b = 0.001; u1 = 0; u2 = 0; u3 = 0;
$$
# III. BIFURCATION ANALYSIS
The MATLAB software MATCONT is used to perform the bifurcation calculations. Bifurcation analysis deals with multiple steady-states and limit cycles. Multiple steady states occur because of the existence of branch and limit points. Hopf bifurcation points cause limit cycles. A commonly used MATLAB program that locates limit points, branch points, and Hopf bifurcation points is MATCONT(Dhooge, Govaerts, and Kuznetsov, 2003[9]; Dhooge, Govaerts, Kuznetsov, Mestrom and Riet, 2004[10]). This program detects Limit points(LP), branch points(BP), and Hopf bifurcation points(H) for an ODE system
$$
\frac {d x}{d t} = f (x, \alpha)
$$
$x \in R^n$ Let the bifurcation parameter be $\alpha$ . Since the gradient is orthogonal to the tangent vector,
The tangent plane at any point $w = \left[w_{1},w_{2},w_{3},w_{4},\dots , w_{n + 1}\right]$ must satisfy
$$
A w = 0
$$
Where A is
$$
A = \left[ \begin{array}{c c} \partial f / \partial x & | \partial f / \partial \alpha \end{array} \right]
$$
where $\partial f / \partial x$ is the Jacobian matrix. For both limit and branch points, the Jacobian matrix $J = [\partial f / \partial x]$ must be singular.
For a limit point, there is only one tangent at the point of singularity. At this singular point, there is a single non-zero vector, $\mathbf{y}$ , where $\mathrm{Jy} = 0$ . This vector is of dimension $n$ . Since there is only one tangent the vector
$$
y = \left(y _ {1}, y _ {2}, y _ {3}, y _ {4}, \dots y _ {n}\right) \text {must have} \hat {w} = \left(w _ {1}, w _ {2}, w _ {3}, w _ {4}, \dots w _ {n}\right). \text {Since}
$$
$$
J \hat {w} = A w = 0
$$
the $n + 1$ th component of the tangent vector $\mathcal{W}_{n + 1} = 0$ at a limit point (LP).
For a branch point, there must exist two tangents at the singularity. Let the two tangents be $z$ and $w$ . This implies that
$$
A z = 0
$$
$$
A w = 0
$$
Consider a vector $\mathbf{v}$ that is orthogonal to one of the tangents (say $\mathbf{w}$ ). $\mathbf{v}$ can be expressed as a linear combination of $\mathbf{z}$ and $\mathbf{w}(\nu = \alpha z + \beta w)$ . Since $A\mathbf{z} = A\mathbf{w} = 0$ , $A\nu = 0$ and since $\mathbf{w}$ and $\mathbf{v}$ are orthogonal,
$w^{T}v = 0$ . Hence $Bv = \begin{bmatrix} A \\ w^{T} \end{bmatrix} v = 0$ which implies that B is singular.
Hence, for a branch point (BP) the matrix $B = \begin{bmatrix} A \\ w^T \end{bmatrix}$ must be singular.
At a Hopf bifurcation point,
$$
\det \left(2 f _ {x} (x, \alpha) @ I _ {n}\right) = 0
$$
@ indicates the bialternate product while $I_{n}$ is the n-square identity matrix. Hopf bifurcations cause limit cycles and should be eliminated because limit cycles make optimization and control tasks very difficult. More details can be found in Kuznetsov (1998[11]; 2009[12]) and Govaerts (2000) [13].
# IV. MULTIOBJECTIVE NONLINEAR MODEL PREDICTIVE CONTROL (MNLMPC)
The rigorous multiobjective nonlinear model predictive control (MNLMPC) method developed by Flores Tlacuahuaz et al (2012)[14] was used.
Consider a problem where the variables $q_{j}(t_i)$, (j = 1,\dots,n), have to be optimized simultaneously for a dynamic problem
$$
\frac {d x}{d t} = F (x, u)
$$
$t_{f}$ being the final time value, and n the total number of objective variables and u the control parameter. The single objective optimal control problem is solved individually optimizing each of the variables $\sum_{t_i = 0}^{t_i = t_f}q_j(t_i)$ The optimization of $\sum_{t_i = 0}^{t_i = t_f}q_j(t_i)$ will lead to the values $q_{j}^{*}$ . Then, the multiobjective optimal control (MOOC) problem that will be solved is
$$
\min \left(\sum_ {j = 1} ^ {n} \left(\sum_{t_i=0} ^ {t _ {i} = t _ {f}} q _ {j} \left(t _ {i}\right) - q _ {j} ^ {*}\right)\right) ^ {2}
$$
$$
subject to \quad \frac {d x}{d t} = F (x, u);
$$
This will provide the values of u at various times. The first obtained control value of u is implemented and the rest are discarded. This procedure is repeated until the implemented and the first obtained control values are the same or if the Utopia point where $\left(\sum_{t_i = 0}^{t_i = t_f}q_j(t_i) = q_j^*\right)$ for all j is obtained.
Pyomo (Hart et al, 2017)[15] is used for these calculations. Here, the differential equations are converted to a Nonlinear Program (NLP) using the orthogonal collocation method. The NLP is solved using IPOPT (Wächter and Biegler, 2006)[16] and confirmed as a global solution with BARON (Tawarmalani, M. and N. V. Sahinidis 2005)[17].
1. The steps of the algorithm are as follows
2. Optimize $\sum_{t_i = 0}^{t_i = t_f}q_j(t_i)$ and obtain $q_{j}^{*}$ .
3. Minimize $\left(\sum_{j=1}^{n}\left(\sum_{t_{i}=0}^{t_{i}=t_{f}} q_{j}\left(t_{i}\right)-q_{j}^{*}\right)\right)^{2}$ and get the control values at various times.
4. Implement the first obtained control values
Repeat steps 1 to 3 until there is an insignificant difference between the implemented and the first obtained value of the control variables or if the Utopia point is achieved. The Utopia point is when
$$
\sum_{i=0}^{t_f} q _ {j} \left(t _ {i}\right) = q _ {j} ^ {*} \quad \text{for all }j.
$$
Sridhar (2024)[18] demonstrated that when the bifurcation analysis revealed the presence of limit and branch points, the MNLMPC calculations converge to the Utopia solution. For this, the singularity condition, caused by the presence of the limit or branch points was imposed on the co-state equation
(Upreti, 2013)[19]. If the minimization of $q_{1}$ lead to the value $q_{1}^{*}$ and the minimization of $q_{2}$ lead to the value $q_{2}^{*}$ . The MNLMPC calculations will minimize the function $(q_{1} - q_{1}^{*})^{2} + (q_{2} - q_{2}^{*})^{2}$ . The multiobjective optimal control problem is
$$
\min \quad \left(q _ {1} - q _ {1} ^ {*}\right) ^ {2} + \left(q _ {2} - q _ {2} ^ {*}\right) ^ {2} \quad \text{subject to} \; \frac {d x}{d t} = F (x, u)
$$
Differentiating the objective function results in
$$
\frac {d}{d x _ {i}} \left(\left(q _ {1} - q _ {1} ^ {*}\right) ^ {2} + \left(q _ {2} - q _ {2} ^ {*}\right) ^ {2}\right) = 2 \left(q _ {1} - q _ {1} ^ {*}\right) \frac {d}{d x _ {i}} \left(q _ {1} - q _ {1} ^ {*}\right) + 2 \left(q _ {2} - q _ {2} ^ {*}\right) \frac {d}{d x _ {i}} \left(q _ {2} - q _ {2} ^ {*}\right)
$$
The Utopia point requires that both $(q_{1} - q_{1}^{*})$ and $(q_{2} - q_{2}^{*})$ are zero. Hence
$$
\frac {d}{d x _ {i}} \left(\left(q _ {1} - q _ {1} ^ {*}\right) ^ {2} + \left(q _ {2} - q _ {2} ^ {*}\right) ^ {2}\right) = 0
$$
The optimal control co-state equation (Upreti; 2013)[43] is
$$
\frac {d}{d t} \left(\lambda_ {i}\right) = - \frac {d}{d x _ {i}} \left(\left(q _ {1} - q _ {1} ^ {*}\right) ^ {2} + \left(q _ {2} - q _ {2} ^ {*}\right) ^ {2}\right) - f _ {x} \lambda_ {i}; \quad \lambda_ {i} \left(t _ {f}\right) = 0
$$
$\lambda_{i}$ is the Lagrangian multiplier. $t_f$ is the final time. The first term in this equation is 0, and hence
$$
\frac {d}{d t} \left(\lambda_ {i}\right) = - f _ {x} \lambda_ {i}; \lambda_ {i} \left(t _ {f}\right) = 0
$$
At a limit or a branch point, for the set of ODE $\frac{dx}{dt} = f(x,u)$ $f_{x}$ is singular. Hence there are two different vector values for $[\lambda_i]$ where $\frac{d}{dt} (\lambda_i) > 0$ and $\frac{d}{dt} (\lambda_i) < 0$ . In between there is a vector $[\lambda_i]$ where $\frac{d}{dt} (\lambda_i) = 0$ . This coupled with the boundary condition $\lambda_{i}(t_{f}) = 0$ will lead to $[\lambda_i] = 0$ . This makes the problem an unconstrained optimization problem, and the optimal solution is the Utopia solution.
# V. RESULTS AND DISCUSSION
When $\theta$ is the bifurcation parameter, a branch point is located at (sv, cs, cv, rv, bv, $\theta$ ) values of (25000, 0, 0, 0, 0, 0.469300) (Fig. 1a).
For the MNLMPC, u1, u2, u3 are the control parameters, and $\sum_{t_i = 0}^{t_i = t_f}cv(t_i),\sum_{t_i = 0}^{t_i = t_f}cs(t_i)$ were minimized individually, and each led to a value of 0. The overall optimal control problem will involve the minimization of $\left(\sum_{t_i = 0}^{t_i = t_f}cv(t_i) - 0\right)^2 +\left(\sum_{t_i = 0}^{t_i = t_f}cs(t_i) - 0\right)^2$ was minimized subject to the equations governing the model. This led to a value of zero (the Utopia point). The MNLMPC values of the control variables, u1, u2, and u3 were 0.202, 0.454, 0.465. The MNLMPC profiles are shown in Figs 2a-2d. The control profiles of u1, u2, and u3 exhibited noise (Fig. 2c) and this was remedied using the Savitzky-Golay filter to produce the smooth profiles u1sg, u2sg, and u3sg (Fig. 2d).
The presence of the branch point causes the MNLMPC calculations to attain the Utopia solution, validating the analysis of Sridhar(2024)[18].
# VI. CONCLUSIONS
Bifurcation analysis and multiobjective nonlinear control (MNLMPC) studies on a mastitis dynamic model. The bifurcation analysis revealed a branch point. The branch point (which causes multiple steady-state solutions from a singular point) is very beneficial because it enables the Multiobjective nonlinear model predictive control calculations to converge to the Utopia point (the best possible solution) in the models. A combination of bifurcation analysis and Multiobjective Nonlinear Model Predictive Control (MNLMPC) for a mastitis dynamic model is the main contribution of this paper.
Data Availability Statement
All data used is presented in the paper
Conflict of Interest
The author, Dr. Lakshmi N Sridhar has no conflict of interest.
Acknowledgments
Dr. Sridhar thanks Dr. Carlos Ramirez and Dr. Suleiman for encouraging him to write single-author papers

Fig. 1a $\theta$ : Is bifurcation parameter


Fig. 2a: MNLMPC cs, cv profiles
Fig. 2b: MNLMPC sv, rv, bv profiles


Fig. 2c: MNLMPC u1, u2, u3 profiles
Fig. 2d: MNLMPC u1sg, u2sg, u3sg profiles
Generating HTML Viewer...
− Conflict of Interest
The authors declare no conflict of interest.
− Ethical Approval
Not applicable
− Data Availability
The datasets used in this study are openly available at [repository link] and the source code is available on GitHub at [GitHub link].