Adaptive Control of CO 2 Production during Milk Fermentation in a Batch Bioreactor

: The basic characteristic of batch bioreactors is their inability to inﬂow or outﬂow the substances during the fermentation process. This follows in the simple construction and maintenance, which is the signiﬁcant advantage of batch bioreactors. Unfortunately, this characteristic also results in the inability of the current industrial and laboratory batch bioreactors to control fermentation production during the process duration. In some recent studies, it was shown that changing the temperature could inﬂuence the execution of the fermentation process. The presented paper shows that this phenomenon could be used to develop the closed-loop control system for the fermentation production control in batch bioreactors. First, based on theoretical work, experiments, and numerical methods, the appropriate structure of the mathematical model was determined and parameters were identiﬁed. Next, the closed-loop control system structure for batch bioreactor was proposed, and the linear and adaptive control system based on this structure and the derived and identiﬁed model were developed. Both modeling and adaptive control system design are new and represent original contributions. As expected, due to the non-linearity of the controlled plant, the adaptive control represents a more successful approach. The simulation and experimental results were used to conﬁrm the applicability of the proposed solution.


Basic Facts about Fermentation Process and Batch Bioreactors
The fermentation process represents a planned use of microorganisms (bacteria, yeasts, molds, or algae) or cells (animal or plant cells) to make products advantageous to humans. In the food industry, fermentation refers to bioprocesses where microorganisms' activity creates a desirable change in food and beverages to improve flavor, provide health benefits, or preserve foodstuffs.
Fermentation processes are carried out in bioreactors. With regard to the type of fermentation process, bioreactors are divided into three groups: batch bioreactors, fedbatch bioreactors, and continuous bioreactors. The main difference between the individual types of bioreactors is in their ability to supply and discharge substances during the fermentation process. Batch bioreactors are the simplest and do not allow the input and output of substances during the fermentation process. This means that the time course of the fermentation process quantities depends entirely on the initial concentrations of bioreactor substances. During operation, the bioreactor is closed, and we do not have the ability to control the fermentation process. From an operational standpoint, this type of bioreactor is the least capable. However, due to their uncomplicated construction, these bioreactors are the cheapest to purchase and, at the same time, very easy to maintain. Fedbatch bioreactors allow the introduction of substances during the fermentation process but do not allow the removal of substances. All fermentation products remain in the bioreactor until the end of fermentation. The possibility of adding substances during operation makes it possible to influence the fermentation process in fed-batch bioreactors during operation. Unlike batch bioreactors, fed-batch bioreactors enable a relatively simple and efficient implementation of a closed-loop control system, ensuring the desired dynamics of the fermentation process. Continuous bioreactors are the most capable in terms of adding and removing substances. They allow the inflow and outflow of substances into/from the bioreactor continuously throughout the operation as a flowing stream. Although fed-batch and continuous bioreactors allow greater flexibility during operation, batch bioreactors are still used widely in the industrial environment. Based on data from manufactures and traders, industrial bioreactors are still made primarily for batch processing (some reports even 90% presence in certain areas) [1].
The goal of fermentation is to produce a lot of high-quality fermentation product in the shortest possible time. This goal is achieved when the time course of fermentation quantity follows the prescribed reference course. Therefore, the control of the fermentation process is extremely important.
While the control of the fermentation processes in fed-batch and continuous bioreactors is relatively easy to implement, the control of the batch bioreactors is very difficult to perform. The reason is simple: batch bioreactors do not have an input substance that could be changed through inflow or outflow during the fermentation process and used to control it. The fact that there are extremely rare examples in commercial offers or in academic publications that show the control system for the production control during fermentation processes in batch bioreactors posed a challenge for this study. This paper has focused on developing a control system for a batch bioreactor that utilizes temperature changing to control the growth of the fermentation product. The implementation of the adaptive control system represents an original approach that is not found in other publications.

Literature Review
The problem of the automatic control of the fermentation processes is very important, up to date, and attractive. The availability of non-expensive equipment for the development and manufacture of control systems has caused great topicality in this area in the last three decades. Therefore, in recent years, we have seen an enormous effort from academic institutions and industrial providers to find new control systems for bioreactors.
The initial phase of any control system research represents the determination of the mathematical model of the controlled plant. We can trace the intensive work and new publications in mathematical modeling of the fermentation processes in bioreactors. Still, the progress in the field of mathematical modeling does not reach the development in the field of the control of the fermentation process. In control studies in the last two decades, the fundamental kinetic mathematical model of the fermentation in the bioreactors has still been used commonly for quantitative simulations or theoretical analysis [2][3][4][5]. Unfortunately, in many cases, this model is not the most suitable for the design and synthesis of bioreactor control systems [6]. The new bioreactors enable an easy, fast and wide range of changes in the mechanical (by mixing) and thermal (by heating and cooling) conditions of fermentation processes, also during operation. It turns out that the course of the fermentation process can be influenced by changes in these fermentation quantities (stirrer speed and temperature), and it is not always necessary to control the fermentation process by feeding substances into the bioreactor [7]. To develop the control system for the fermentation process, which would use stirrer speed or heater temperature as an input quantity, we need a mathematical model that describes the influence of these quantities on the fermentation process. References [6,8] are some of the publications where the influence of stirrer speed and heater temperature on the fermentation process is analyzed, and appropriate mathematical models are also determined.
More publications are in the field of the control of bioreactors. The bioreactor fermentation process is a very suitable and attractive process for developing and testing conventional and advanced control theories. The presented review is focused on works dealing with the control of the time profile of the fermentation product.
As expected, most publications are in the field of control systems developed for continuous bioreactors, where control is possible through changes in inflow and outflow during the fermentation. Reference [8] shows the utilization of robust control for continuous bioreactors. The implementation of the sliding mode theory is presented in [9], the use of output linearization in [10], the application of output linearization taking into account the constraints of the input signals is studied in [11], the appropriateness of model predictive control (MPC) is shown in [12,13]. A multitude of new publications testifies to the topicality of the problem and intensive work in this area.
The intensive development of the control systems is also seen in the field of fedbatch bioreactors. Reference [14] shows the use of robust control for the fermentation process in fed-batch bioreactors. The use of an iterative learning controller is presented in [15]. The use of model-based optimization for a fed-batch bioreactor was studied in [16]. References [17,18] discuss the applicability of MPC for fed-batch bioreactor control. Reference [19] shows the implementation of the sliding mode control for the photobioreactor (which works initially in the fed-batch mode and then in continuous operation), but the reference deals only with the fed-batch stage. All publications demonstrate the advantage of advanced control concepts over the conventional closed-loop control of fed-batch bioreactors.
As opposed to continuous-and fed-batch bioreactors, relatively few publications have been observed that address the closed-loop control of the time profile of the fermentation product quantity during the fermentation process in batch bioreactors. Most batch bioreactors still operate autonomously, without closed-loop control, which would control the fermentation process. Publications in the field of batch bioreactor control are mainly limited to the control of bioreactors' subsystems. Many works show different control theories or different realizations for temperature regulation, pH regulation, oxygen control, and stirrer speed control. The most considered is temperature regulation. Reference [20] comparatively shows the use of MPC and sliding mode control for temperature regulation in a batch bioreactor. Reference [21] shows temperature control of fermentation bioreactor for ethanol production using internal model control (IMC) based PID controller. Modified fractional-order IMC-PID for ethanol production is proposed in [22]. Non-linear autoregressive moving average neuro controller for temperature control in bioreactors is shown in [23]. The temperature control of an alcoholic fermentation process through Takagi-Sugeno modeling is presented in [24]. A fuzzy-split range control system applied to the fermentation process is shown in [25].
Because of the importance of dissolved CO 2 for the fermentation process, it is also possible to find frequent publications considering CO 2 monitoring. Reference [26] discusses the importance of real-time CO 2 monitoring for the proper execution of the fermentation process. Reference [27] describes sensors for real-time dissolved CO 2 monitoring and control. A noninvasive approach for monitoring dissolved CO 2 in cell culture using a silicon sampling loop is presented in [28].
However, very few publications deal with the control of the growth of microorganisms in batch bioreactors. The growth is visible in the time course of the generation of the endproduct quantity during the fermentation. Only a few references in this field were found. The gain scheduling control was used in [29]. Reference [30] shows the implementation of the PI-controller. Reference [31] studies the application of model reference adaptive control. The absence of publications studying the control of the yield of the fermentation product in batch bioreactors was also an additional motivation to work even more in-depth and intensively in this area.

Contributions and Novelties
There are two major contributions of this article.

•
The first contribution of the presented study is the discovery of the solution for the closed-loop control of the growth of microorganisms (and, thus, control the time course of the fermentation product quantity), which will be valid for batch bioreac-tors. The controlled operation mode has so far been reserved only for the fed-batch and continuous bioreactors, which are much more expensive to purchase and more difficult to maintain than batch bioreactors. All today's industrial or laboratory batch bioreactors operate without a closed-loop control system in an autonomous mode. The time course of the fermentation product quantity depends only on the initial concentrations of substances introduced into the bioreactor before the start of the fermentation process. The presented solution is based on the finding that changing the bioreactor's temperature could be used for the closed-loop control of the fermentation product profile. This discovery was obtained from the analysis of previous studies, from simulation calculations based on the derived mathematical model, and from the laboratory experiments. Based on this finding, the structure of the closed-loop control system was defined. This structure allows the use of different control approaches.

•
The second contribution of the article is the finding that adaptive control is very convenient for the control of the time course of the fermentation product in batch bioreactors. A study of various adaptive theories was made. Model reference adaptive control based on almost strictly positive real theory proved to be convenient for the implementation of the founded control structure. This control approach assures stability, easy realization, and an undemanding choice of adaptation coefficients. The proposed adaptive control system was compared with the conventional linear control system. The advantages of the developed adaptive control system are to ensure the desired course of the fermentation process even when the parameters of the mathematical model of the fermentation process are unknown. An additional and important advantage of the presented adaptive control system is that it ensures the same performance even in the case of significantly different fermentation processes.
In such a way, the batch bioreactors, thanks to the advanced control theory, easily and cheaply acquire the possibility to significantly improve their performance. The implementation of the developed adaptive control system does not the require major modification of batch bioreactors, and all basic advantages of these reactors are retained. The adaptive control system is easy to start and does not require time-consuming bioreactor identification and the controller's parameter setting.
The shorter fermentation time and higher quality of the obtained fermentation products are guaranteed, which means greater efficiency of operation. In addition to simulations, the efficiency and stability of the proposed adaptive control system have also been proven by experiments on a laboratory bioreactor. Although the applicability of the adaptive control system is confirmed in the case of CO 2 production during milk fermentation, the proposed control system is universal and is suitable for controlling various fermentation processes in batch bioreactors.
The originally presented novelties in this article are: • A new derived non-linear mathematical model which describes the impact of temperature on the fermentation process substances in batch bioreactors; • The use of an optimization technique for mathematical model parameters estimation; • The definition of the fundamental control structure for control of time courses of fermentation products in batch bioreactors using temperature changes; • Implementation of conventional linear and adaptive control theories for control of the fermentation product response; • Comparison of the efficiency of both control approaches and simulation-based numerical evaluation of both control approaches; • Experimental confirmation of the proposed adaptive control system.

Studied Fermentation Process
The presented study focused on the production of CO 2 during milk fermentation with kefir grains. Traditionally, kefir is produced by inoculating kefir grains, which are a mixture of proteins, polysaccharides, mesophilic, homofermentative, and heterofermentative lactic acid streptococci, thermophilic and mesophilic lactobacilli, acetic acid bacteria, and yeast. The fermentation of milk by the inoculum proceeds for ca. 24 h, during which time, homofermentative lactic acid streptococci grow rapidly, initially causing a reduction in pH. This low pH favors the growth of lactobacilli but causes the streptococci number to decline. The presence of yeasts in the mixture, together with fermentation temperature, encourages the growth of aroma-producing heterofermentative streptococci. As fermentation proceeds, the growth of lactic acid bacteria is favored.
For the original fermentation, before the fermentation, kefir grains (40 g) were activated for 5 successive days so that they were washed daily with cold water and put into 500 mL of fresh pasteurized whole-fat milk at room temperature. To start the fermentation, 500 mL of fresh pasteurized whole-fat milk was preheated in the fermenter to the desired temperature and then inoculated with 40 g of active kefir grains. For the original fermentation, the desired starting milk temperature was 22 • C, and fully activated (5 days activation) kefir grains were used. Different modified fermentation processes were obtained by means of differently activated kefir grains.
During the fermentation, carbon dioxide, acetic acid, ethyl alcohol, and several other substances are formed, and these give the products their characteristic aroma. Milk fermentation with kefir grains propagation is an inherently very complex process because of the specific nature of the microbial metabolism, as well as the non-linearity of its kinetics. Therefore, fermentation control is extremely important to obtain high-quality products.

Batch Bioreactor
Laboratory fermentations were performed in the reaction calorimeter RC1e from Mettler Toledo. It is a computer-controlled benchtop batch bioreactor with a working volume of 0.7 L. By using specific modifications in hardware and software, it was used as a bioreactor. A more detailed description of RC1e can be found in [31].

Heating/Cooling System
The tested batch bioreactor was factory equipped with the combined heating/cooling (H/C) system. The silicone oil used as a heat transfer agent is pumped through the double jacket of the reactor in a closed circulation system. H/C system is equipped with an integrated closed-loop temperature control system with a proportional-integral (PI) controller. The H/C system enables the changing of the temperature of the bioreactor's contents in the range from 5 • C to 50 • C. The temperature control system enables operation without steady-state error for a constant reference temperature. The delay in the temperature control system is very short compared to the dynamics of the fermentation process. The H/C system was identified and modelled. The 1st-order differential equation with unit gain and estimated time constant T ϑcs = 0.1 h represents a satisfactory description of its dynamics.

Dissolved CO 2 Measurement
The selection of the output quantity that could be used as the feedback variable in the control system is crucial for the implementation of the control theory and the realization of the theoretical approach. It is necessary that the measured quantity contains as much information on the fermentation process as possible. At the same time, it is also important that the measurement should be accurate and could be performed on-line.
In the fermentation processes, dissolved oxygen and cell culture measurement are essential for ensuring optimal conditions for cell growth. The oxygen levels in bioreactors can have an impact on the growth rate, nutrients' uptake, cellular morphology, and metabolite synthesis, leading to end-product quality. Accurate oxygen control is only possible if measurements from dissolved oxygen sensors installed in fermenters/bioreactors are reliable. Biomass concentration is another critically needed measurement in fermentation studies.
In performing laboratory tests, it is not always possible to measure these two biochemical quantities and, thus, conclude whether their trajectories are such as to ensure the Mathematics 2021, 9, 1712 6 of 25 desired course of the fermentation process with a high-quality end product. This is the reason that in the proposed study, the measurement of the CO 2 dissolved in the bioreactor's medium was introduced. CO 2 is a product of the cellular metabolism of microorganisms. Assuming the growth medium with a sufficient carbon source, the measured CO 2 concentration profile could also be the indicator of the fermentation progress [32]. Accurate, real-time data on the concentration of CO 2 increases the understanding of the fermentation process and can get a better insight into cell metabolism, cell culture productivity, and other changes within bioreactors [33]. The distribution of the CO 2 in the bioreactor medium is very homogeneous. The sensors for the measurement of CO 2 concentration are reliable, accurate, maintenance free, have a long lifetime, and have a known measurement curve [33]. The duration of the measurement process is short; therefore, these sensors are convenient for implementation in real-time control systems.
For the measurement of the dissolved CO 2 in the laboratory bioreactor the ISE51B (Mettler Toledo) ion-selective electrode was used. A measuring system can be modelled with the 1st-order differential equation. The laboratory measuring system can be matched with the mathematical model with a gain k CO2ms = 1 mmol/g and a time constant T CO2ms < 0.01 h. The time constant of the measurement system is almost negligible compared to the inherently slow dynamics of the biotechnological systems.

Equipment for Data Acquisition and Control
For the connection of the dissolved CO 2 measurement sensor and signal adjustment, the SevenMulti (Mettler Toledo) basic device with an expansion module was used. The analogue 1st-order low-pass filter for the elimination of sensor noise is integrated into the expansion module.
For the transfer of measured signals from the SevenMulti basic unit to PC, the basic device was equipped with a digital output module (USB). For the comprehensive measurement of several quantities over a long time period and for the necessary signal processing, software LabX direct pH 2.3 was installed on the PC. This is professional equipment used for a data logger and a data analysis. The selected sampling time was 10 min. This sampling time was sufficient due to the slow dynamics of the fermentation process. During the performing the experiments, the sampling time was changed and adjusted to the dynamics of the measured signal. The measured data were saved into Microsoft Office 365 Excel documents, transferred into MathWorks MATLAB, and processed using MATLAB with its Optimization toolbox functions [7].
For the implementation of the control system, a dSpace 1103 PPC controller board was utilized. The controller is equipped with 16-bit A/D and D/A converters as well as serial and CAN interfaces [7]. An analogue output module of the basic device SevenMulti was used for the transfer of the measured signal of the CO 2 concentration from the bioreactor system to the controller's analogue input. The additional analogue 1st-order low-pass filter was used at the dSpace analogue input to eliminate the superposed noise signal. The analogue output signal from the controller is sent to the input of the heating/cooling system. To enable this connection, the heating/cooling system was equipped with an additional electronic interface.

Reference Profile Generation
The quantity and quality of the product in the batch bioreactor are decisively dependent on the trajectories of the biological quantities in the fermentation process, affecting the kinetics of the bioprocess. The developed control system makes the influencing of the time responses of the biological quantities possible. With the developed control system, we can change the time course of biological quantities in a batch bioreactor. In this way, we can influence the fermentation process and its result. The question arose about how to choose a reference trajectory. The reference trajectory selected should provide that the generated product will be high quality, abundant, and that the process will end in a shorter time, with as little energy and material resources as possible. There are many professional and scientific publications where the methods for determining the optimal trajectory for different fermentation processes for fed-batch bioreactors are discussed that could also be useful for batch bioreactors [3]. The presented article does not deal with the methods of determining the optimal trajectory. The primary purpose of this study is the development of a control system that will ensure that the fermentation process quantities will follow the previous set reference trajectory. Therefore, the reference trajectory used in this paper was determined by the empirically obtained expert knowledge of the consumers of the bioreactor's technology [33]. The reference trajectory of the dissolved CO 2 course was generated by means of dSpace 1103 PPC controller board.

Laboratory Set-Ups for Parameter Estimation and Control
To perform the parameter estimation and fermentation control, the laboratory batch bioreactor was supplemented with the controlled heating/cooling system, measuring system, PC for parameter estimation, and dSpace for control implementation. The laboratory set-up for the measurement of the time response of the dissolved CO 2 production on the temperature changes and estimation of model parameters is shown in Figure 1a. Laboratory set-up for the control of the dissolved CO 2 production is shown in Figure 1b. scientific publications where the methods for determining the optimal trajectory for d ferent fermentation processes for fed-batch bioreactors are discussed that could also useful for batch bioreactors [3]. The presented article does not deal with the methods determining the optimal trajectory. The primary purpose of this study is the developm of a control system that will ensure that the fermentation process quantities will foll the previous set reference trajectory. Therefore, the reference trajectory used in this pap was determined by the empirically obtained expert knowledge of the consumers of bioreactor's technology [33]. The reference trajectory of the dissolved CO2 course was g erated by means of dSpace 1103 PPC controller board.

Laboratory Set-Ups for Parameter Estimation and Control
To perform the parameter estimation and fermentation control, the laboratory ba bioreactor was supplemented with the controlled heating/cooling system, measuring s tem, PC for parameter estimation, and dSpace for control implementation. The laborato set-up for the measurement of the time response of the dissolved CO2 production on temperature changes and estimation of model parameters is shown in Figure 1a. Labo tory set-up for the control of the dissolved CO2 production is shown in Figure 1b.

Mathematical Model of the Fermentation Process
Fermentation is described as a process in which an agent causes an organic substance to break down into simpler substances. The agents are mainly microorganisms, the source substance is named a substrate, and the final substance is named a product [7].
Fermentation is a non-linear, time-dependent complex system with a poorly known structure and unknown parameters. There are many mathematical models of the fermentation process of different types and degrees of complexity. Almost all models are derived from the mass balance of microorganisms, substrate, and product [5].
The fundamental mathematical model of the fermentation process in batch bioreactor represents a state-space non-linear model of the 3rd order [2][3][4][5]. The state-space variables of this model are the concentrations of the microorganisms, substrate, and product. This model is autonomous-it has no input variable. This is expected because batch bioreactors do not have an input quantity to control the fermentation process. The transients of the model's variables are obtained as the response to the initial values of the substances. During the fermentation process, the quantity of the microorganisms and product increases, and the quantity of substrate decreases. All parameters of the fundamental kinetic model are supposed to be constant throughout the duration of the fermentation process.
The commonly accepted fundamental kinetic mathematical model of the fermentation process enables the simple and efficient simulation and analysis of the fermentation process in cases of different initial concentrations. In many studies, it has been proven that the profiles of the fermentation process substances can be influenced by changing the operating conditions during fermentation. The profiles are most easily influenced by the bioreactor's heating/cooling system and the stirrer system. In [6,30], an analysis of the influence of temperature change on the course of the fermentation process is made, and the influence of stirrer speed change is discussed in [6,7,31]. The fundamental mathematic model does not enable the evaluation of the impact of temperature changes on the time courses of concentrations of individual substances of the fermentation process. The knowledge of this dependence is essential for the design and synthesis of convenient control systems. This is the reason that in the article, a new model that involves the phenomenon of the impact of temperature on the fermentation process was derived and presented.
The derived model is the non-autonomous non-linear 4th-order state-space mathematical model, whose input is the reference temperature of the heating system, and the model's state variables are the concentrations of microorganisms, substrate, fermentation product, and bioreactor's temperature. The impact of temperature on the fermentation process is taken into account by assuming that temperature influences the fundamental model parameters. The derived model is presented with (1)- (4): .
where the input of the non-autonomous state-space model is: u(t)-the reference temperature of the bioreactor's temperature control system ( • C). The state-space variables of the mathematical model denote the following biological and thermal quantities: x 1 (t)-the concentration of the microorganisms (g/L); x 2 (t)-the concentration of the substrate (g/L); x 3 (t)-the concentration of the product (g/L); x 4 (t)-the temperature in the bioreactor ( • C). Additionally, the parameters of the mathematical model are: µ m -the maximum microorganisms' growth rate (h −1 ); P i -the product inhibition constant (g/L); S m -the substrate saturation constant (g/L); S i -the substrate inhibition constant (g/L); α-the parameter that describes the relation between product yield and microorganism growth; β-the parameter that describes the product yield that is independent of the microorganism growth (h −1 ); ϑ 0 -the temperature of the bioreactor's contents at the beginning of the fermentation process ( • C), normally ϑ 0 is equal to the outside temperature; k µ m -the coefficient that describes the impact of the temperature changing on the maximum microorganisms' growth rate µ m ( • C); k α -the coefficient that describes the impact of temperature changing on the parameter that describes the relation between product yield and microorganism growth ( • C); T ϑcs -time constant of the simple 1st-order model of the controlled heating system (h).

Conventional Control System with a Linear Controller
In order to improve the economy of the fermentation and the quality and quantity of the fermentation product, it is necessary to ensure that the actual time profile of the yield of the fermentation product is as close as possible to the reference one. The fermentation process is a non-linear process, but the deviation between the response of the non-controlled fermentation process and the reference trajectory is relatively small. Therefore, the control of the yield of the fermentation product is also possible with the conventional control system with a linear controller. By selecting the performance index and using the optimization method, we can ensure that the controller will provide optimum performance in the broadest possible operating range. The block diagram of the fermentation process control system with a linear controller is shown in Figure 2. x2(t)-the concentration of the substrate (g/L); x3(t)-the concentration of the product (g/L); x4(t)-the temperature in the bioreactor (°C). Additionally, the parameters of the mathematical model are: μm-the maximum microorganisms' growth rate (h −1 ); Pi-the product inhibition constant (g/L); Sm-the substrate saturation constant (g/L); Si-the substrate inhibition constant (g/L); α-the parameter that describes the relation between product yield and microorganism growth; β-the parameter that describes the product yield that is independent of the microorganism growth (h −1 ); ϑ0-the temperature of the bioreactor's contents at the beginning of the fermentation process (°C), normally ϑ0 is equal to the outside temperature; m -the coefficient that describes the impact of the temperature changing on the maximum microorganisms' growth rate µm (°C); kα-the coefficient that describes the impact of temperature changing on the parameter that describes the relation between product yield and microorganism growth (°C); cs -time constant of the simple 1st-order model of the controlled heating system (h).

Conventional Control System with a Linear Controller
In order to improve the economy of the fermentation and the quality and quantity of the fermentation product, it is necessary to ensure that the actual time profile of the yield of the fermentation product is as close as possible to the reference one. The fermentation process is a non-linear process, but the deviation between the response of the non-controlled fermentation process and the reference trajectory is relatively small. Therefore, the control of the yield of the fermentation product is also possible with the conventional control system with a linear controller. By selecting the performance index and using the optimization method, we can ensure that the controller will provide optimum performance in the broadest possible operating range. The block diagram of the fermentation process control system with a linear controller is shown in Figure 2. The main disadvantage of this approach is the need for knowledge of the accurate mathematical model of the batch bioreactor's fermentation process. The structure and parameters of the mathematical model must be known to perform the tuning of the control system. Determining the appropriate mathematical model of a batch bioreactor is hugely time consuming. It is necessary to execute the whole fermentation process with a constant The main disadvantage of this approach is the need for knowledge of the accurate mathematical model of the batch bioreactor's fermentation process. The structure and parameters of the mathematical model must be known to perform the tuning of the control system. Determining the appropriate mathematical model of a batch bioreactor is hugely time consuming. It is necessary to execute the whole fermentation process with a constant temperature and, after that, repeat the fermentation with the same charge but a changeable temperature. From the responses, all the parameters of the non-linear model (µ m , P i , S m , S i , α, β, k µ m , k α , and T ϑcs ) must be estimated by means of the optimization technique. Finally, the control system tuning must be made by means of the estimated mathematical model. Due to the time-consuming and challenging identification procedure for determining the mathematical model, the use of the conventional linear control system proved to be less appropriate for industrial applications. It makes sense to use a control approach that will not require knowledge of the batch bioreactor's mathematical model.

Adaptive Control System
The adaptive theory represents an ideal tool for developing a control system for batch bioreactors. Adaptive control systems do not require accurate knowledge of the controlled plant's mathematical model and can adapt their parameters to the changing dynamics of the controlled plant. An additional reason that justifies the use of adaptive strategies for the control of batch bioreactors is that the fermentation processes are executed very slowly, allowing the unproblematic implementation of computationally complex adaptive algorithms.
There are two main approaches to the development of adaptive control systems. The first approach is called indirect adaptive control or self-tuning control (STC) [34]. The advantage of indirect control is its modularity, which allows a combination of different identification methods (least squares, maximum likelihood, instrumental variables, corrector least squares) and different tuning procedures (deterministic and stochastic).
The second approach is termed direct adaptive control because control input is, in general, calculated directly, without preliminary determination of the controlled plant mathematical model. Due to the mandatory reference model, this adaptive control is also called model reference adaptive control (MRAC). Almost all modern MRAC systems can be classified as evolving from one of the three following adaptive approaches: • Adaptive control systems based on the full-state access method, which requires that all state variables of the controlled plant are measurable (MRAC-FSA) [35]; • Adaptive control systems based on the input-output description of a controlled plant, where an adaptive observer is incorporated into the controller to overcome the inability to access the entire state space vector (MRAC-AO) [36]; • Adaptive control systems, where the adaptive algorithm only requires that the controlled plant's outputs and the reference model states are available for measurement. The asymptotic stability of this adaptive approach is assured in the case when the plant is almost strictly positive real. This adaptive approach is called model reference adaptive control for almost strictly positive real plants (MRAC-ASPR) [37].
MRAC-ASPR is not new, but is more recent than the previously mentioned adaptive approaches. This approach is an output feedback method that requires neither full state feedback nor adaptive observers. The essential improvement of the MRAC-ASPR concept related to the other STC and MRAC concepts is that the MRAC-ASPR theory is also applicable for non-linear controlled plants [38,39]. The other significant qualities of this class of algorithms are given as follows:

•
They are applicable to non-minimum phase systems; • The order of the controlled plant need not be known to select the reference model and the adaptation mechanism; • The adaptation mechanism is computationally undemanding.
Because of all these advantages, the MRAC-ASPR theory was used to develop the adaptive control system to control the fermentation process in a batch bioreactor. Due to the simple realization of this type of adaptive control system, the name simple adaptive control instead of MRAC-ASPR will also be used.
The proposed MRAC-ASPR was revealed primarily to control the continuous linear systems subject to uncertainty in the parameters [37]. Such consideration coincides with the derived and verified linearized mathematical model of the fermentation process of a batch bioreactor obtained with the linearization of the non-linear model around the fermentation process's trajectory. In 2009, the extension of the MRAC-ASPR theory to minimum-phase nonstationary and non-linear systems was made [38]. Reference [39] shows a detailed and complete description of this theory, with added new results considering non-linear system stability analysis. The MRAC-ASPR concept has been used successfully in different engineering areas to control non-linear controlled plants (electrical drives, robotics, power systems, and chemistry). The MRAC-ASPR concept was also used to design an adaptive system that controls the fermentation process in bioreactors by varying the rotational speed of the mixing system [7]. However, there are no publications showing the use of MRAC-ASPR to control the fermentation process in batch bioreactors by changing the temperature of the heating system.
The following is a brief description of the controller's adaptive algorithm. The MRAC-ASPR will be presented for the control of the controlled plant, which is described by a state-space model [38]: . where: x(t), u(t), and y(t) are the state-space vector, input scalar, and output scalar of the mathematical model of the controlled plant; A(x,t), b(x,t), and c T (x,t) are the non-linear functions of the mathematical model of the controlled plant.
The desired static and dynamic behaviour of the closed-loop controlled system are defined with the state-space reference model [39]: where: x m (t), u m (t), and y m (t) are the state-space vector, input scalar, and output scalar of the reference model, and A m , b m , and c T m are the system matrix, input vector, and output vector of the reference model.
The reference model is assumed to be bounded-input/bounded-state stable. The task of the reference model is only to represent the desired input-output behaviour. The number of state-space variables of the reference model can be significantly less than the number of state-space variables of the controlled plant, as described by the equation: Since the order of the reference model is in general not the same as the order of the mathematical model of the controlled plant, it is not possible to require the state-space variables of the controlled plant to follow the state-space variables of the reference model. Instead, a request is made that the controlled plant output y(t) follows the output of the reference model y m (t) asymptotically. The output tracking error e y (t) is defined with: The extension of the Lyapunov stability theory to non-linear non-autonomous systems was applied for the derivation of the adaptive control algorithm [37][38][39]. The main request by the derivation of the adaptive control algorithm was to ensure the stability of the entire control system. The final goal was to obtain an adaptive algorithm that will generate such controlled plant input signal u(t) which will assure that the controlled plant output y(t) will approximate "reasonably well" the output of the reference model y m (t) without explicit knowledge of the controlled plant functions A(x,t), b(x,t) and c T (x,t) [32]. The determined adaptive control algorithm is expressed with: where scalar K e (t) is the stabilizing output feedback parameter, and matrix K x (t) and scalar K u (t) are control gains. Parameters K e (t), K x (t) and K u (t) can be united in a vector of adaptive gains K(t), and the variables e y (t), x m (t) and u m (t) can be linked in a vector of control variables r(t): The adaptive gains K(t) can be represented as the sum of the two terms: of the proportional term K p (t) and integral term K i (t), as written in (14) [37].
The proportional-and integral terms can be calculated with the following non-linear equations [37]: .
where T is a positive semi-definite matrix and T is a positive definite matrix. The proportional term K p (t) drives the system very quickly towards a small tracking error, and the integral term K i (t) guarantees convergence. In the MRAC-ASPR concept, we cannot talk about the optimal gain value that the adaptive controller wants to achieve. The gain varies during operation according to the error [7].
In order to improve the convergence of the adaptive system, the following modification of the integral term was proposed [37]: where the task of the σ-term is to protect the integral gains from divergence if there are disturbances.
The block diagram of the control system with simple adaptive controller is shown in Figure 3.
without explicit knowledge of the controlled plant functions A(x,t), b(x,t) and c T (x,t) [32]. The determined adaptive control algorithm is expressed with: where scalar Ke(t) is the stabilizing output feedback parameter, and matrix Kx(t) and scalar

Ku(t) are control gains. Parameters Ke(t), Kx(t) and Ku(t) can be united in a vector of adaptive gains K(t), and the variables ey(t), xm(t) and um(t) can be linked in a vector of control variables r(t):
The adaptive gains K(t) can be represented as the sum of the two terms: of the proportional term Kp(t) and integral term Ki(t), as written in (14) [37].
The proportional-and integral terms can be calculated with the following non-linear equations [37]: where T' is a positive semi-definite matrix and T is a positive definite matrix. The proportional term Kp(t) drives the system very quickly towards a small tracking error, and the integral term Ki(t) guarantees convergence. In the MRAC-ASPR concept, we cannot talk about the optimal gain value that the adaptive controller wants to achieve. The gain varies during operation according to the error [7].
In order to improve the convergence of the adaptive system, the following modification of the integral term was proposed [37]: where the task of the σ-term is to protect the integral gains from divergence if there are disturbances.
The block diagram of the control system with simple adaptive controller is shown in Figure 3.

Estimation of Model Parameters
The parameters µ m , P i , S m , S i , α, β, k µ m , k α , and T ϑcs depend on the quality and quantity of the substances. They remain almost constant during the fermentation process. They can be calculated for the real bioreactors by different optimization methods from the measured trajectories of the bioreactors' substances. For the studied fermentation process in a laboratory bioreactor, the Particle Swarm algorithm was used to obtain the mathematical model's parameters. The integral absolute error between measured and model fermentation product variables was used as the optimization method's performance index.
For the estimation of the parameters, the studied fermentation process was executed two times in the laboratory bioreactor.
First, an appropriate amount of fully activated microorganisms (kefir grains) and substrate (milk) was introduced into the bioreactor. The dissolved CO 2 was selected as the fermentation product. The initial concentrations of microorganisms, substrate, and fermentation product were measured. The obtained values are given in Table 1. The fermentation process was then performed at a constant temperature. The time courses of concentrations of all substances were measured. From the obtained measurements, the parameter µ m , P i , S m , S i , α, and β were estimated by means of particle swarm optimization. Table 1. Initial values of the fermentation process in the studied bioreactor.

Variable Value
The initial value of the microorganisms' concentration Then, the fermentation process with the equal initial substances (fully activated kefir grains) was performed again. This time, during the operation, the reference temperature value of the heating system was changed from 22 • C to 29 • C. The step-change of the reference temperature (i.e., the input signal of the controlled plant) occurs in the fermentation's growing phase, 2 h after the beginning of the fermentation. The courses of the substances' concentrations were measured again, and the model parameters k µ m , k α , and T ϑcs were estimated.
The parameters of the identified mathematical model of the milk fermentation process in the laboratory batch bioreactor where fully activated kefir grains were used are presented in Table 2.

Parameter Value
The maximum microorganisms' growth rate µ m = 0.

Parameter Value
The parameter of the product yield independent of the microorganisms' growth The coefficient of the impact of the temperature changing on the maximum microorganisms' growth rate µ m k µ m = 0.1 ( The coefficient of the impact of the temperature changing on the parameter α k α = 1.15 The temperature of the bioreactor's contents at the beginning of the fermentation process, normally this temperature is equal to the outside temperature The time constant of the 1st-order model of the controlled heating system T ϑcs = 0.1 h The matching of the response of the measured CO 2 concentration in the laboratory bioreactor with the response of the CO 2 concentration calculated with the identified mathematical model is displayed in Figure 4. It shows the results of the fermentation with the changeable bioreactor's temperature. Note, in the experiment and in the simulations, the step increase in the reference temperature from 22 • C for 7 • C occurred at t = 2 h.  The simulation results show that the derived model can justifiably be used for bioprocess analysis and control system development. The calculation (with optimization techniques) of the model parameters is not complicated but can take a lot of time.
For the evaluation of the efficiency of the control system for different fermentations, the modified fermentation process was executed and identified. The difference between the original and modified fermentation process was in the kefir grains used for the fermentation. While kefir grains activated by washing with cold water and transferred into fresh milk for 5 successive days were used for the original fermentation, inactivated kefir grains were used in the modified process. This resulted in a slower fermentation and a lower final value of the fermentation product. The parameters of the mathematical model of the modified fermentation process are shown in Table 3. Table 3. Parameters of the mathematical model for the modified fermentation process in the studied laboratory batch bioreactor where inactivated kefir grains were used. The simulation results show that the derived model can justifiably be used for bioprocess analysis and control system development. The calculation (with optimization techniques) of the model parameters is not complicated but can take a lot of time.

Parameter Value
For the evaluation of the efficiency of the control system for different fermentations, the modified fermentation process was executed and identified. The difference between the original and modified fermentation process was in the kefir grains used for the fermentation. While kefir grains activated by washing with cold water and transferred into fresh milk for 5 successive days were used for the original fermentation, inactivated kefir grains were used in the modified process. This resulted in a slower fermentation and a lower final value of the fermentation product. The parameters of the mathematical model of the modified fermentation process are shown in Table 3. Table 3. Parameters of the mathematical model for the modified fermentation process in the studied laboratory batch bioreactor where inactivated kefir grains were used.

Parameter Value
The maximum microorganisms' growth rate The coefficient of the impact of the temperature on the maximum microorganisms' growth rate The coefficient of the impact of the temperature on the temperature inhibition constant P i k α = 0.04 ( • C) −1

Results Obtained with the Conventional Control System
The use of a linear controller makes sense since the analysis of a linearized mathematical model in the vicinity of the trajectory of the non-controlled fermentation process showed a relatively small range of variations in the model's parameters.
A simple PI-controller with transfer function G PI (s) (18) is used to demonstrate the efficiency of the conventional control system with linear controller for comparison with the advanced adaptive control system, where k p is the gain and T i is the time constant of the PI-controller. The controller synthesis was done using the optimization method for the integral time square cost function J of the output error variable and input variable. The cost function J is presented with [30]: where: u(t) is the input variable of the mathematical model of the controlled plant (i.e., the reference temperature of the bioreactor's temperature control system ( • C)); y(t) is the output variable of the mathematical model of the controlled plant (i.e., the output of the measurement system for the dissolved CO 2 concentration (mmol/L)); r(t) is empirically determined reference trajectory for the dissolved CO 2 concentration; ϑ 0 is the temperature of the bioreactor's mixture at the beginning of the fermentation process ( • C), normally ϑ 0 is equal to the outside temperature; Q, R-are the weighting parameters of the quadratic cost function; t f is the final time.
For the tested fermentation process in the laboratory bioreactor, the following reference trajectory r(t) for the dissolved CO 2 was chosen: This reference trajectory was determined based on the dissolved CO 2 trajectory of the uncontrolled fermentation process in this bioreactor. The modification of the trajectory was made in such a way that the controlled fermentation process will finish in a shorter time and that the amount of the generated product will be higher. The biological limitations must be taken into consideration. It is necessary to ensure that the reference trajectory does not deviate excessively from the CO 2 concentration trajectory of the autonomous fermentation process.
The trajectory of the actual dissolved CO 2 of the batch bioreactor without a control system, and the reference (desirable) trajectory of the dissolved CO 2 of the batch bioreactor, are shown in Figure 5. The task of the developed control system is to ensure that the actual output value will follow the prescribed reference trajectory as closely as possible.
Mathematics 2021, 9, x 16 of Figure 5. The trajectory of the dissolved CO2 of the original fermentation process in batch bioreac without a control system (solid line) and the reference trajectory of the dissolved CO2 of the ba bioreactor (dashed line); data of the original fermentation process with fully activated kefir gra are shown in Table 2; the reference trajectory is described with Equation (20).
The cost function (19) was calculated by means of simulations of the closed-loop co trol system. Simulations were made with a non-linear model of the controlled plant (1 (4) with the parameters from Table 2

and the initial concentration values given in Table
In optimization calculations, the parameters kp and Ti of the PI-controller w changed in order to obtain the minimum value of the cost function. Particle swarm op mization (PSO) was used for the calculation of the controller's parameters. PSO is a m taheuristic procedure that may provide a sufficiently effective solution to an optimizati problem in cases where there are few, incomplete, imperfect or no assumptions about t problem being optimized. Functions from MathWorks MATLAB/Optimization Toolb library were used for faster realization of the PSO for the calculation of the parameters the mathematical model. Matlab function particleswarm.m is based on the algorithm d scribed in [40], using the modifications suggested in [41,42]. The details of the PSO alg rithm in the particleswarm.m function are written in [43].
The simulations were calculated for the time period from t = 0 h to t = 10 h. T weighting coefficients Q and R have been selected so that both terms of the cost functi were proportionally weighted and that with the controller calculated reference tempe ture of the heating system remained within the realizable range. For the chosen cost fun tion's parameters, Q, R, tf, and the constant initial temperature of the bioreactor's fillin ϑ0, = 1 = 0.1 f = 10 ℎ 0 = 292 ° ; ( the following parameters of the PI-controller were calculated:  Table 2; the reference trajectory is described with Equation (20).
The cost function (19) was calculated by means of simulations of the closed-loop control system. Simulations were made with a non-linear model of the controlled plant (1)-(4) with the parameters from Table 2 and the initial concentration values given in Table 1.
In optimization calculations, the parameters k p and T i of the PI-controller were changed in order to obtain the minimum value of the cost function. Particle swarm optimization (PSO) was used for the calculation of the controller's parameters. PSO is a metaheuristic procedure that may provide a sufficiently effective solution to an optimization problem in cases where there are few, incomplete, imperfect or no assumptions about the problem being optimized. Functions from MathWorks MATLAB/Optimization Toolbox library were used for faster realization of the PSO for the calculation of the parameters of the mathematical model. Matlab function particleswarm.m is based on the algorithm described in [40], using the modifications suggested in [41,42]. The details of the PSO algorithm in the particleswarm.m function are written in [43].
The simulations were calculated for the time period from t = 0 h to t = 10 h. The weighting coefficients Q and R have been selected so that both terms of the cost function were proportionally weighted and that with the controller calculated reference temperature of the heating system remained within the realizable range. For the chosen cost function's parameters, Q, R, t f , and the constant initial temperature of the bioreactor's filling, ϑ 0 , the following parameters of the PI-controller were calculated: The obtained control results are presented in Figures 6 and 7. The time response of the actual dissolved CO 2 concentration of a batch bioreactor controlled with a conventional PIcontroller, together with the reference trajectory, is shown in Figure 6. The bioreactor's inner temperature x 4 (t), resultantly to the control of the heating/cooling system, is presented in Figure 7. No limiters or anti-windup were used. The controller's output stays in the feasible range, and it does not exceed the maximum or minimum limits.
Mathematics 2021, 9, x 17 of 25 Figure 6. Time responses of the reference and actual dissolved CO2 concentration of the original fermentation process in the batch bioreactor; the conventional control system with the linear controller with calculated parameters was used; data of the controlled original fermentation process with fully activated kefir grains are shown in Table 2; the controller parameters are shown in (22). It is expected that the controller provides good control of the fermentation process, for which its parameters have been optimized. Conversely, we cannot expect that the same controller will optimally control other fermentation processes.
The efficiency of the optimized control system was evaluated for the modified fermentation process. The parameters of the modified fermentation process are written in Table 3. Figure 8 shows the trajectory of the dissolved CO2 of the modified fermentation process without a control system and the reference (desirable) trajectory of the dissolved CO2. Figure 6. Time responses of the reference and actual dissolved CO 2 concentration of the original fermentation process in the batch bioreactor; the conventional control system with the linear controller with calculated parameters was used; data of the controlled original fermentation process with fully activated kefir grains are shown in Table 2; the controller parameters are shown in (22).  Table 2; the controller parameters are shown in (22). It is expected that the controller provides good control of the fermentation process, for which its parameters have been optimized. Conversely, we cannot expect that the same controller will optimally control other fermentation processes.
The efficiency of the optimized control system was evaluated for the modified fermentation process. The parameters of the modified fermentation process are written in Table 3. Figure 8 shows the trajectory of the dissolved CO2 of the modified fermentation process without a control system and the reference (desirable) trajectory of the dissolved CO2. It is expected that the controller provides good control of the fermentation process, for which its parameters have been optimized. Conversely, we cannot expect that the same controller will optimally control other fermentation processes.
The efficiency of the optimized control system was evaluated for the modified fermentation process. The parameters of the modified fermentation process are written in Table 3. Figure 8 shows the trajectory of the dissolved CO 2 of the modified fermentation process without a control system and the reference (desirable) trajectory of the dissolved CO 2 .
Mathematics 2021, 9, x 18 of 25 Figure 8. The trajectory of the dissolved CO2 of the modified fermentation process in batch bioreactor without a control system (solid line) and the reference trajectory of the dissolved CO2 of the batch bioreactor (dashed line); data of the modified fermentation process with inactivated kefir grains are shown in Table 3, and the reference trajectory is described in Equation (20). Figures 5 and 8 seem similar, but there is a significant difference in the dynamics of the fermentation process. While the original fermentation process is completed in ca. 6 h, the modified fermentation process lasts more than 10 h.
The results of the control of the modified fermentation process with parameters in Table 3 with the PI-controller with original (non-modified) parameters (22) are shown in Figure 9. Figure 9. Time responses of the reference and actual dissolved CO2 concentration of the modified fermentation process in the batch bioreactor; the conventional control system with the linear controller with calculated parameters was used; data of the controlled modified fermentation process with inactivated kefir grains are shown in Table 3; the controller parameters are shown in (22).

Results Obtained with the Simple Adaptive Control System
A simple adaptive control system based on the MRAC-ASPR control theory was used Figure 8. The trajectory of the dissolved CO 2 of the modified fermentation process in batch bioreactor without a control system (solid line) and the reference trajectory of the dissolved CO 2 of the batch bioreactor (dashed line); data of the modified fermentation process with inactivated kefir grains are shown in Table 3, and the reference trajectory is described in Equation (20). Figures 5 and 8 seem similar, but there is a significant difference in the dynamics of the fermentation process. While the original fermentation process is completed in ca. 6 h, the modified fermentation process lasts more than 10 h.
The results of the control of the modified fermentation process with parameters in Table 3 with the PI-controller with original (non-modified) parameters (22) are shown in Figure 9.  Table 3, and the reference trajectory is described in Equation (20). Figures 5 and 8 seem similar, but there is a significant difference in the dynamics of the fermentation process. While the original fermentation process is completed in ca. 6 h, the modified fermentation process lasts more than 10 h.
The results of the control of the modified fermentation process with parameters in Table 3 with the PI-controller with original (non-modified) parameters (22) are shown in Figure 9. Figure 9. Time responses of the reference and actual dissolved CO2 concentration of the modified fermentation process in the batch bioreactor; the conventional control system with the linear controller with calculated parameters was used; data of the controlled modified fermentation process with inactivated kefir grains are shown in Table 3; the controller parameters are shown in (22).

Results Obtained with the Simple Adaptive Control System
A simple adaptive control system based on the MRAC-ASPR control theory was used for the batch bioreactor's control implementation. Figure 9. Time responses of the reference and actual dissolved CO 2 concentration of the modified fermentation process in the batch bioreactor; the conventional control system with the linear controller with calculated parameters was used; data of the controlled modified fermentation process with inactivated kefir grains are shown in Table 3; the controller parameters are shown in (22).

Results Obtained with the Simple Adaptive Control System
A simple adaptive control system based on the MRAC-ASPR control theory was used for the batch bioreactor's control implementation.
The presented adaptive control system assures that the batch bioreactor's output (i.e., the measured dissolved CO 2 concentration) follows the output of the reference model in the case of unknown and variable bioreactor's kinetics. In such a way, the adaptive controller enables that the bioreactor's dynamics stay the same during repetitions of the batch processes. The presented results were obtained for the adaptive control system with the reference model represented with the 1st-order term with gain k rm = 0.8 and the time constant T rm = 1.5 h. This reference model produces step response equal to the reference signal in (20). The parameters of the adaptation mechanism were obtained on the basis of numerical simulations with the non-linear model. No optimization technique was used to find the optimal values for the adaptation mechanism's parameters. Numerical simulations were used only to determine the approximate values of the parameters of the adaptation mechanism. The obtained values are convenient for different size batch bioreactors. An accurate setting of the parameters is not necessary. The following adaptation coefficient matrix based on a positive definite identity matrix: were used to carry out the adaptive control.
In addition, the σ-term wasused to avoid the divergence of integral gains in the presence of a disturbance.
The results of the simple adaptive control technique for the fermentation process in the batch bioreactor are shown in Figures 10 and 11. Figure 10 shows the reference and the actual time response of the dissolved CO 2 concentration. The time response of the generated product of the fermentation process follows the reference variable despite the unknown parameters of the controlled plant and its structure uncertainties. The temperature of the bioreactor's filling, which was necessary to assure that actual dissolved CO 2 concentration follows the reference trajectory, is shown in Figure 11. The controller's output stays in the feasible range, and it does not exceed the maximum or minimum limits.
Mathematics 2021, 9, x 19 of 25 the case of unknown and variable bioreactor's kinetics. In such a way, the adaptive controller enables that the bioreactor's dynamics stay the same during repetitions of the batch processes. The presented results were obtained for the adaptive control system with the reference model represented with the 1st-order term with gain krm = 0.8 and the time constant Trm = 1.5 h. This reference model produces step response equal to the reference signal in (20). The parameters of the adaptation mechanism were obtained on the basis of numerical simulations with the non-linear model. No optimization technique was used to find the optimal values for the adaptation mechanism's parameters. Numerical simulations were used only to determine the approximate values of the parameters of the adaptation mechanism. The obtained values are convenient for different size batch bioreactors. An accurate setting of the parameters is not necessary. The following adaptation coefficient matrix based on a positive definite identity matrix: were used to carry out the adaptive control.
In addition, the σ-term wasused to avoid the divergence of integral gains in the presence of a disturbance.
The results of the simple adaptive control technique for the fermentation process in the batch bioreactor are shown in Figures 10 and 11. Figure 10 shows the reference and the actual time response of the dissolved CO2 concentration. The time response of the generated product of the fermentation process follows the reference variable despite the unknown parameters of the controlled plant and its structure uncertainties. The temperature of the bioreactor's filling, which was necessary to assure that actual dissolved CO2 concentration follows the reference trajectory, is shown in Figure 11. The controller's output stays in the feasible range, and it does not exceed the maximum or minimum limits. Figure 10. Time responses of the reference and actual dissolved CO2 concentration of the original fermentation process in the batch bioreactor; simple adaptive control was used; data of the controlled original fermentation process with fully activated kefir grains are shown in Table 2, the adaptation mechanism parameters in (23) and (24).  Table 2, the adaptation mechanism parameters in (23) and (24). The results of the control of the modified fermentation process with parameters in Table 3 with the simple adaptive control (23) and (24) are shown in Figure 12. The time response of the dissolved CO2 concentration of a batch bioreactor controlled with the simple adaptive controller, together with the reference trajectory, is shown. Figure 12. Time responses of the reference and actual dissolved CO2 concentration of the modified fermentation process in the batch bioreactor; simple adaptive control was used; data of the controlled modified fermentation process with inactivated kefir grains are shown in Table 3, the adaptation mechanism parameters in (23) and (24).

Experimental Results Obtained with the Simple Adaptive Control System
Developed control systems were tested on the laboratory batch bioreactor. HW and SW equipment described in Section 2.2.4. and 2.3. was used for the implementation of control systems. From the simulations was seen that the differences between responses are not significant. The results of laboratory tests were comparable. Due to additional reasons related to the realization and equipment used, it is difficult to objectively evaluate individual control concepts' effectiveness from the test results. Figure 13 shows the time The results of the control of the modified fermentation process with parameters in Table 3 with the simple adaptive control (23) and (24) are shown in Figure 12. The time response of the dissolved CO 2 concentration of a batch bioreactor controlled with the simple adaptive controller, together with the reference trajectory, is shown. The results of the control of the modified fermentation process with parameters in Table 3 with the simple adaptive control (23) and (24) are shown in Figure 12. The time response of the dissolved CO2 concentration of a batch bioreactor controlled with the simple adaptive controller, together with the reference trajectory, is shown. Figure 12. Time responses of the reference and actual dissolved CO2 concentration of the modified fermentation process in the batch bioreactor; simple adaptive control was used; data of the controlled modified fermentation process with inactivated kefir grains are shown in Table 3, the adaptation mechanism parameters in (23) and (24).

Experimental Results Obtained with the Simple Adaptive Control System
Developed control systems were tested on the laboratory batch bioreactor. HW and SW equipment described in Section 2.2.4. and 2.3. was used for the implementation of control systems. From the simulations was seen that the differences between responses are not significant. The results of laboratory tests were comparable. Due to additional reasons related to the realization and equipment used, it is difficult to objectively evaluate individual control concepts' effectiveness from the test results. Figure 13 shows the time Figure 12. Time responses of the reference and actual dissolved CO 2 concentration of the modified fermentation process in the batch bioreactor; simple adaptive control was used; data of the controlled modified fermentation process with inactivated kefir grains are shown in Table 3, the adaptation mechanism parameters in (23) and (24).

Experimental Results Obtained with the Simple Adaptive Control System
Developed control systems were tested on the laboratory batch bioreactor. HW and SW equipment described in Sections 2.2.4 and 2.3 was used for the implementation of control systems. From the simulations was seen that the differences between responses are not significant. The results of laboratory tests were comparable. Due to additional reasons related to the realization and equipment used, it is difficult to objectively evaluate individual control concepts' effectiveness from the test results. Figure 13 shows the time responses of the reference and actual dissolved CO 2 concentration obtained with the experiment where the simple adaptive control was used for control of fermentation process of laboratory batch bioreactor with fully activated kefir grains. It can be seen from Figure 13 that the developed adaptive control system ensures the tracking of the actual dissolved CO 2 concentration to the reference trajectory. The deviation at the beginning of the transient is due to zero initial values in the integral elements of the adaptation mechanism. The reference trajectory tracking can be further improved by selecting the adaptation mechanism's initial values and weighting coefficients adjusted to the fermentation process. The response to the control of the fermentation process with inactivated kefir grains was very similar despite the fact that the controller's parameters stay unchanged. responses of the reference and actual dissolved CO2 concentration obtained with the experiment where the simple adaptive control was used for control of fermentation process of laboratory batch bioreactor with fully activated kefir grains. It can be seen from Figure  13 that the developed adaptive control system ensures the tracking of the actual dissolved CO2 concentration to the reference trajectory. The deviation at the beginning of the transient is due to zero initial values in the integral elements of the adaptation mechanism. The reference trajectory tracking can be further improved by selecting the adaptation mechanism's initial values and weighting coefficients adjusted to the fermentation process. The response to the control of the fermentation process with inactivated kefir grains was very similar despite the fact that the controller's parameters stay unchanged.

Discussion
At first sight, the results obtained with both presented control systems are excellent and very similar, especially for the fermentation process with parameters in Table 2. Almost identical dynamics of the fermentation process were obtained, as defined with the reference trajectory. To achieve these responses, acceptable changes were requested in the bioreactor's inner temperature. Figures 5-7 show clearly that the developed linear controller provides very good tracking of the actual CO2 concentration to the reference value for the original fermentation process for which controller's parameters were optimized. In this way, the fermentation process was made significantly more economical. The fermentation time was shortened. The duration of the non-controlled fermentation is about 6 h, and the duration of the controlled fermentation is approx. 5 h. An increase in concentration was also obtained of approx. 0.1 mmol/L. The efficiency of the same controller is lower if it is used to control modified fermentation processes, which is seen in Figures 8 and 9. Slight oscillations are visible from the results. The difference between the original and the modified fermentation process is that in the case of the original fermentation process, fully activated kefir grains were used. In the case of the modified fermentation process, the used kefir grains were inactivated. Original control parameters do not ensure optimal behavior in the case of the modified fermentation process. In this case, the fermentation process should be reidentified, and a new tuning of the controller parameters should be performed. Figures 10 and 11 show the results obtained with the developed adaptive controller. Results are very similar to the results of the optimized linear controller. The advantage of the adaptive controller is visible when used to control fermentation processes that have

Discussion
At first sight, the results obtained with both presented control systems are excellent and very similar, especially for the fermentation process with parameters in Table 2. Almost identical dynamics of the fermentation process were obtained, as defined with the reference trajectory. To achieve these responses, acceptable changes were requested in the bioreactor's inner temperature. Figures 5-7 show clearly that the developed linear controller provides very good tracking of the actual CO 2 concentration to the reference value for the original fermentation process for which controller's parameters were optimized. In this way, the fermentation process was made significantly more economical. The fermentation time was shortened. The duration of the non-controlled fermentation is about 6 h, and the duration of the controlled fermentation is approx. 5 h. An increase in concentration was also obtained of approx. 0.1 mmol/L. The efficiency of the same controller is lower if it is used to control modified fermentation processes, which is seen in Figures 8 and 9. Slight oscillations are visible from the results. The difference between the original and the modified fermentation process is that in the case of the original fermentation process, fully activated kefir grains were used. In the case of the modified fermentation process, the used kefir grains were inactivated. Original control parameters do not ensure optimal behavior in the case of the modified fermentation process. In this case, the fermentation process should be reidentified, and a new tuning of the controller parameters should be performed. Figures 10 and 11 show the results obtained with the developed adaptive controller. Results are very similar to the results of the optimized linear controller. The advantage of the adaptive controller is visible when used to control fermentation processes that have different dynamics. The presented adaptive control system assures that the batch bioreactor's output (i.e., the measured dissolved CO 2 concentration) follows the output of the reference model in the case of unknown and variable bioreactor's kinetics. It can be seen from Figure 12 that the adaptive controller maintains the same time course of the output quantity, even in the case of significantly changed (and unknown) parameters of the fermentation process. In this case, the duration of the fermentation process was shortened from 10 h to 5 h, while an increase in concentration was also obtained of approx. 0.2 mmol/L.
To obtain better insight into the performances of the control systems, an evaluation was made based on the Performance Index. Since the purpose was to evaluate both control concepts as accurately as possible, these calculations were made on the basis of simulation results. The experimental results are affected by additional random external disturbances that obscure the comparison of control algorithms. The integral quadratic Performance Index, the same as the cost function shown in (19), was used for the comparative calculations. The same parameters of the Performance Index as for the PI-controller optimization were used to estimate the control quality (21). Disturbances and noise were added to the measured fermentation product variable to achieve the most realistic conditions, equal for both control systems. Disturbances and noise were estimated from the measured results. Band-limited white noise with the correlation time 0.1 h and the noise power 0.01 was used. The disturbances were generated by a PRBS signal with the amplitude 0.05, which was filtered through the transfer function G(s) = s (5s 2 +4s+1) . Results for both controllers for two fermentations processes are shown in Table 4. Table 4. Performance indexes for the studied bioreactor's control systems. Table 2 (Activated Kefir Grains)

Original Fermentation Process with the Data in
conventional control system with PI-controller J = 4.2496 simple adaptive control system J = 4.2864 Table 3 (Inactivated Kefir Grains)

Modified Fermentation Process with the Data in
conventional control system with PI-controller J = 9.9223 simple adaptive control system J = 9.0363 The difference between the calculated performance indexes for the original fermentation process (fermentation process data in Table 2) was minimal. It was expected that the conventional control system with the PI-controller would obtain good results because its parameters were optimized with the same cost function. On the other hand, it is encouraging that the simple adaptive control system led to almost the same results, even though the initial parameters of the control algorithm were zero, and those weighting coefficients of the adaptation mechanism were chosen very easily, without any optimization approach. The important advantage of the simple adaptive controller is visible in the control of the modified fermentation process (fermentation process data in Table 3). The results obtained with a linear regulator, which was not optimized for this process, were significantly worse (more than 10%) than the results of the adaptive controller, which itself adapted to the changing dynamics of the modified fermentation process.
Despite the similar performance indexes, the proposed adaptive control approach presents a much better choice for developing the control system for the batch bioreactor. The main advantage of the adaptive control system is that the detailed knowledge of the batch bioreactor and the substances used is not necessary. The simple adaptive controller adapts its operation automatically to the different dynamics of the fermentation processes. The pre-operation tuning is minimal. On the other hand, if we want to use a conventional linear controller with constant parameters, a preliminary determination of the mathematical model of the fermentation process is mandatory to ensure satisfactory control. Determining a mathematical model is time-consuming and involves determining a non-linear model and its linearization.

Conclusions
The article combines the fields of Control Engineering and Bioprocess Engineering. It shows the applicability of the conventional and advanced control approaches for the control of the fermentation processes in the batch bioreactors.
There are some important conclusions and contributions of this paper: • The study confirmed that by changing the temperature in the batch bioreactor, the execution of the fermentation process could be controlled; • The author showed that the proposed minor supplementation of the batch bioreactor with a controlled heating/cooling system and CO 2 measurement system enables the development of the closed-loop control system, which ensures that the time profiles of substantial biological quantities during the fermentation process will be the same as the reference profile; • The author derived an original non-linear mathematical model of the fermentation process in the batch bioreactor, which describes the influence of temperature variations in the bioreactor on the courses of the fermentation quantities; the derived model was used for the design and synthesis of the closed-loop control systems; • Based on the derived mathematical model, the author utilizes a conventional closedloop control system with optimized parameters, which ensures that the course of trajectories of substantial biological quantities during the fermentation process will be the same as the course of the reference trajectories when the parameters of the mathematical model are known; • The author reviewed various advanced control concepts and, on this basis, proposed and developed a control system based on the use of adaptive control theory. The proposed usage of the MRAC-ASPR theory for the development of the control of the growth in the fermentation process in batch bioreactor represents the main original contribution.

•
It has been shown that the developed simple adaptive control system represents a very effective control for batch bioreactor operation. The advantage of the developed adaptive controller is significantly easier implementation while having the same or better performance as a conventional controller, which requires complicated and timedemanding tuning. The proposed adaptive control system was analysed theoretically and experimentally, and its advantages were confirmed with the results.
The similarity of the results obtained with the optimized conventional linear control system and advanced non-linear adaptive control system could lead to the opinion that both presented control concepts' efficiencies are very similar. However, there is a major difference between the tuning procedure and the related usability of both concepts. While the use of linear control with constant parameters requires knowledge of the exact mathematical model of each fermentation process, the adaptive control ensures the desired course of the fermentation process, even when the structure and parameters of the mathematical model are unknown.

Conflicts of Interest:
The authors declare no conflict of interest.