**1. Introduction**

Bioprocesses, in general, and acetification as an example, are especially complex owing to the large number of variables involved and their mutual interactions. When a bioprocess is microbially driven—which is the case with acetification—most of the complexity arises from the biological activity of a cell population that is usually highly diverse and capable of adjusting to a variety of environments—and hence of behaving in rather different manners. The problem is even greater when the microbial population comprises not a single species but rather a mixture of species or even genera. Although omics techniques have considerably increased the available knowledge on industrial bioprocesses, there is still a long way to go before they can be elucidated at the molecular scale, so their modelling is an invaluable tool to design them as efficiently as possible.

Because such systems are normally industrially or economically significant, developed models are frequently used to identify the operating conditions that will optimize the output in terms of specific performance indicators or variables. The scientific literature abounds with very recent references to modelled bioprocesses: the xanthan biosynthesis by *Xanthomonas campestris* ATCC 13951 using winery wastewater [1], the uricase production by *Aspergillus welwitschiae* strain 1–4 [2], the use of polyethylene terephthalate (PET) for the cultivation of *Pseudomonas* sp. GO16 [3], the extracellular protease production by a native *Bacillus aryabhattai* Ab15-ES [4] and many other examples could be found. Usually, however, the large number of variables involved in a process, and their mutual interactions, require careful analysis and specific optimization methods with a view to establishing their optimum values for the intended purpose.

**Citation:** Álvarez-Cáliz, C.M.; Santos-Dueñas, I.M.; Jiménez-Hornero, J.E.; García-García, I. Optimization of the Acetification Stage in the Production of Wine Vinegar by Use of Two Serial Bioreactors. *Appl. Sci.* **2021**, *11*, 1217. https://doi.org/10.3390/app11031217

Academic Editor: Alessandro Leone Received: 31 December 2020 Accepted: 23 January 2021 Published: 28 January 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

The acetification process, which involves a bio-oxidative transformation effected by a mixture of acetic acid bacteria (AAB) [5], leads to the biological conversion of ethanol into acetic acid. Industrial acetification bioreactors usually operate in an automated repeated semi-continuous mode, so that once the fermenters are fully loaded, the ethanol concentration is allowed to decrease to a preset level and then a certain fraction of the reactor volume is unloaded, actuating the remainder as an inoculum for the next conversion cycle [6–11]. After the bioreactor is unloaded, it is slowly replenished with fresh alcoholic substrate to start a new ethanol cycle. For any specific substrate, typical operational variables are the ethanol concentration at the time the reactor is unloaded, the percentage of unloaded volume and the loading rate [12–17], which influence the mean ethanol and acetic acid concentrations in the culture medium leading to more or less stressing environmental conditions for the acetic acid bacteria (AAB) and so affecting to the rate and efficiency of the process. In practice, it is necessary to optimize the outcome of the acetification process under operationally restricted conditions, for instance, the end product must have a very little ethanol concentration but if ethanol in the culture medium is almost depleted, the high acidity and lack of substrate would affect very negatively the action of AAB in next cycles. In this regard, the use of two identical serially arranged bioreactors working in a repeated semi-continuous mode, see Figure 1, could be a proper alternative to overcome the problem; this possibility is also suggested from several reported models for the acetification process [7–11,18–27]. In many vinegar plants the main reactors (bioreactor B1 in Figure 1) are partially unloaded in additional depletion fermenters (bioreactor B2 in Figure 1) where the ethanol concentration could be exhausted. This set up, in practice, results in six operational variables the values of which must be found: *Eu*1, ethanol concentrations at the time the first bioreactor is unloaded; *El*<sup>1</sup> and *El*<sup>2</sup> the ethanol concentrations during loading of the first and second bioreactor, respectively; *Vu*<sup>1</sup> volume of medium unloaded from the first bioreactor and *T*<sup>1</sup> and *T*<sup>2</sup> the constant working temperatures of the first and second bioreactor, respectively.

**Figure 1.** Two identical serially arranged bioreactors working in a repeated semi-continuous mode for the production of wine vinegar.

Among the different approaches used for modelling this process, the black-box models based on second order generalized polynomials [7,11,24–27] showed to be the best alternatives because of their simplicity and accurate predictions.

Because of the previous comments and with the aim of optimizing the process, a first work was carried out for modelling the behavior of two serially arranged bioreactors working in a repeated semi-continuous mode [27]. Now, in this work, the obtained black box models are being used to find the operating conditions leading to the maximum and minimum values of specific industrially useful variables that were used as objective functions.

### **2. Materials and Methods**

#### *2.1. Raw Material and Microorganisms*

As substrate, white wine from the Montilla–Moriles D.O. (Córdoba, Spain) containing (11.5 ± 0.5) % (*v*/*v*) ethanol and an initial acidity of (0.4 ± 0.1)% (*w*/*v*) as acetic acid was used. Imitating industrial procedures, the inoculum used was a natural mixed culture [5] maintained and stored in our laboratories from experiments in a long-term fully operational bench acetator working with either wine or a synthetic ethanol medium; the original inoculum was taken, approximately a couple of years before, from an industrial tank in full operation (UNICO Vinagres y Salsas, S.L.L., Córdoba, Spain). First, a stage for reactivating and for the adaptation of the inoculum, which includes several previous acetification cycles to achieve repetitive results, was performed [27]. Additional details about some methodological aspects for obtaining the experimental data used to build the models necessary for the optimization study carried out in this work, were described elsewhere [27]; in any case, as a summary, the only variable not determined automatically was acidity, which was measured by acid—base titration with an NaOH solution approximately 0.5 N that was previously standardized with potassium hydrogen phthalate. The volume and ethanol concentration were measured in a continuous manner by using an EJA 110 differential pressure probe from Yokogawa Electric Corp. (Tokyo, Japan) and an Alkosens probe equipped with an Acetomat transducer from Heinrich Frings, respectively.

### *2.2. Operating Mode*

Operation of the two bioreactors working serially, see Figure 2, is summarized as follows: once the ethanol concentration in the first reactor decreased to a preset value *Eu*1, a volume of medium *Vu*<sup>1</sup> was unloaded into the second. Then, both bioreactors were loaded with fresh wine to an also preset level (*El*<sup>1</sup> and *El*2, respectively). Once the maximum volume of medium with which each bioreactor could be loaded (8 L) was reached, the acetification system entered an ethanol depletion stage. When the ethanol concentration again fell to *Eu*1, the second bioreactor was completely unloaded for replenishment with medium from the first. Depending on the particular operating conditions, the second bioreactor may not be loaded to full capacity and *Vu*<sup>2</sup> be less than 8 L as a result. In addition, each reactor can be operated at a different temperature (*T*<sup>1</sup> and *T*2, respectively). Different values of each of the previous variables can therefore lead to minimum or maximum levels of the dependent variables.

One should bear in mind that the primary aim was to maintain the first bioreactor under non-stressing conditions for the culture to retain its activity; in this way, unloading a fraction of fermentation medium into the second bioreactor would supply it with healthy bacterial biota capable of operating under the substrate depletion conditions they would inevitably find in that reactor. By way of example, the profiles of some state variables of the system, namely, volume of medium, ethanol concentration and acetic acid concentration in each bioreactor are shown in Figure 2.

**Figure 2.** Scheme of two serial bioreactors operating in a repeated semi-continuous mode as well as example of profiles for the volume of medium, ethanol concentration and acetic acid concentration in each bioreactor. *Eu*<sup>1</sup> and *Eu*<sup>2</sup> are the ethanol concentrations at the time the first and second bioreactor, respectively, are unloaded; *El*<sup>1</sup> and *El*<sup>2</sup> the ethanol concentrations during loading of the first and second bioreactor, respectively; and *Vu*<sup>1</sup> and *Vu*<sup>2</sup> the volumes of medium unloaded from the first and second, respectively.

### *2.3. Optimization Method*

The values of the operational variables providing the optimum polynomial functions were determined by solving the constrained non-linear optimization problem defined by Equation (1):

$$\begin{array}{l}\text{Max }f(\mathbf{x})\\\text{s.t. }h(\mathbf{x})=\mathbf{0}\\\text{g}(\mathbf{x})\le\mathbf{0}\end{array},\tag{1}$$

where *f*(*x*) denotes the objective function, *x* the vector of operational (decision) variables, *h*(*x*) the set of equality constraints and *g*(*x*) that of inequality constraints.

If these functions are assumed to be differentiable, then optimal points fulfilling the Karush–Kuhn–Tucker (KKT) conditions can be determined [28,29] from the Lagrange function shown in Equation (2) for a maximization problem (for a minimization problem, the Lagrange function is the same as Equation (2) simply by changing the sign of *f*(*x*)).

$$\mathcal{L}(\mathbf{x}, \lambda, \mu) = f(\mathbf{x}) - \sum\_{j} \lambda\_j h\_j(\mathbf{x}) - \sum\_{i} \mu\_i g\_i(\mathbf{x}),\tag{2}$$

where *λ<sup>j</sup>* and *μ<sup>i</sup>* are the KKT multipliers.

Equation (3) sets the first-order KKT conditions needed for optimality:

$$\begin{array}{ll} \nabla\_{\mathbf{x}} \mathcal{L}(\mathbf{x}, \lambda, \mu) = 0 \\ h\_{\uparrow}(\mathbf{x}) = 0 \\ g\_{i}(\mathbf{x}) \le 0 \\ \mu\_{i} g\_{i}(\mathbf{x}) = 0 \\ \mu\_{i} \ge 0 \end{array} \tag{3}$$

where ∇*<sup>x</sup>* is the gradient operator with respect to *x*.

∇*xgi* and ∇*xhj* must be linearly independent of the active constraints at the critical points *x*\* obtained as solutions to Equation (3). The active constraints at *x*\* are those with associated non-zero KKT multipliers. In a maximization problem, if *f*(*x*) is concave and all *g*(*x*) functions are convex, then *x*\* will be the global solution to the optimization problem. Otherwise, it will be necessary to check whether the second order KKT conditions for *x*\* are fulfilled in order to confirm that they provide a local maximum on *f*(*x*). A function is concave if its Hessian matrix is negative semi-definite (i.e., if all its eigenvalues are equal to or less than 0) and convex if it is positive semi-definite.

Sufficient second-order KKT conditions can be verified by examining the sign of the last *n* − *m* leading principal minors of the bordered Hessian *B* (Equation (4)) evaluated on a critical point.

$$B(\mathbf{x}, \boldsymbol{\lambda}, \boldsymbol{\mu}) = \begin{pmatrix} \nabla\_{\mathbf{x}\mathbf{x}}^2 \mathcal{L}(\mathbf{x}, \boldsymbol{\lambda}, \boldsymbol{\mu}) & \nabla\_{\mathbf{x}} \mathbf{g}(\mathbf{x})^T \\ \nabla\_{\mathbf{x}\mathbf{g}} \mathbf{g}(\mathbf{x}) & 0\_{\mathbf{m} \times \boldsymbol{m}} \end{pmatrix}\_{\begin{pmatrix} \boldsymbol{n} + \boldsymbol{m} \end{pmatrix} \times \begin{pmatrix} \mathbf{w} \end{pmatrix}},\tag{4}$$

where *n* is the number of operational variables, *m* that of active constraints at the critical point, ∇<sup>2</sup> *xx*L(*x*, *λ*, *μ*) the Hessian matrix of L(*x*, *λ*, *μ*) and *g*(*x*) the set of active constraints.

The *k*th leading principal minor of *B*(*x*, *λ*, *μ*) equals *B*(*x*, *<sup>λ</sup>*, *<sup>μ</sup>*)*k*×*<sup>k</sup>* [i.e., the determinant of the *k* × *k* submatrix taken from the upper-left of *B*(*x*, *λ*, *μ*)]. Therefore, the last leading principal minor of *B*(*x*, *λ*, *μ*) equals *<sup>B</sup>*(*x*, *<sup>λ</sup>*, *<sup>μ</sup>*)(*n*+*m*)×(*n*+*m*) [i.e., the determinant of the whole matrix *B*], the penultimate one being *<sup>B</sup>*(*x*, *<sup>λ</sup>*, *<sup>μ</sup>*)(*n*+*m*−1)×(*n*+*m*−1) and so on. For a critical point to be a local maximum, *sign <sup>B</sup>*(*x*, *<sup>λ</sup>*, *<sup>μ</sup>*)(*n*+*m*)×(*n*+*m*) must be equal to (−1)*<sup>n</sup>* and the previous *<sup>n</sup>* − *<sup>m</sup>* − 1 leading principal minors must have an alternating sign.

#### **3. Results and Discussion**

#### *3.1. Optimization of the Mean Rate of Acetic Acid Formation in the Two-Bioreactor System*

One potentially useful variable for assessing the "health" of a bioprocess and its productivity is the rate of biotransformation. Because the bioreactors operated in a nonsteady state here, the target variable was the mean reaction rate, which can be estimated from the rate of ethanol consumption or that of acetic acid formation [6]. When volatile losses are negligible, as it is the case [27], both rates are identical. We focused on the mean rate of acetic acid formation, (*rA*)*global*, because it is easier to estimate.

In [27], the polynomial model for the mean rate of acetic acid formation in the twobioreactor system was obtained (Equation (5)). The model allowed (*rA*)*global est* to be estimated with an error of 0.01 g acetic acid·(100 mL·h)<sup>−</sup>1.

$$\begin{array}{ll} (r\_A)\_{\text{global test}} = & -0.51 + 0.43 \cdot E\_{\text{ul}1} - 0.0654 \cdot E\_{\text{ul}1}^2 \\ & - 0.00456 \cdot E\_{l2} \cdot V\_{\text{ul}1} - 0.00468 \cdot E\_{\text{ul}1} \cdot E\_{l1} \\ & + 0.000672 \cdot T\_1 \cdot E\_{l1} + 0.000839 \cdot E\_{l2} \cdot T\_1 \end{array} \tag{5}$$

As Equation (5) shows, not all the operational variables have a direct influence on (*rA*)*global est*; additionally, as explained in [27], particularly in its Supplementary Material ("S3.docx" file), not all the terms in Equation (5) have the same influence on (*rA*)*global est*; the higher the value of the statistic *F* (see Table 1), the more significant the term is for (*rA*)*global est*; it can be seen from Table 1 that the most influential term is that of *Eu*1.

**Table 1.** Significance of the terms of Equation (5). (Adapted from Table S3.14 in [27], Supplementary Material ("S3.docx" file)).


This model is of especial practical interest as it allows the operating conditions leading to maximum—desirable—or minimum levels of the industrially useful variables to be identified. We used the procedure described in Section 2.3 to develop a MATLAB script [30] that allowed the maximum or minimum value of (*rA*)*global est* to be calculated (see file "Optimal\_rA.m" in Supplementary Materials).

The optimization problem addressed to maximize (*rA*)*global est* is represented by Equations (6) and (7). The latter sets the constraints imposed by the experimental conditions on the operational variables.

$$\begin{array}{ll}\texttt{max} & (r\_A)\_{\text{global cost}} \\ \texttt{s.t.} & \end{array} \tag{6}$$

$$\begin{array}{l} 4.25 \le V\_{\text{l1}} \le 5.75\\ 4 \le E\_{\text{l1}} \le 6\\ 2 \le E\_{\text{l1}} \le 4\\ 28 \le T\_1 \le 32\\ 2.5 \le E\_{\text{l2}} \le 4.5 \end{array} \tag{7}$$

where *Vu*<sup>1</sup> is the volume of medium unloaded from the first bioreactor into the second, *El*<sup>1</sup> the ethanol concentration during loading of the first bioreactor, *Eu*<sup>1</sup> the ethanol concentration at the time the first bioreactor is unloaded, *T*<sup>1</sup> the temperature in the first bioreactor and *El*<sup>2</sup> the ethanol concentration in the second bioreactor during loading.

Solving the previous optimization problem provided the operating conditions of Table 2.

**Table 2.** Values of the operational variables needed to maximize (*rA*)*global est*.


Because of the number of involved operational variables, it is not straightforward to graphically show the optimum obtained with the conditions of Table 2. Nevertheless, considering the previous comments on the significance of the terms in Equation (5), when plotting the response surfaces of (*rA*)*global est* varying just a pair of the operational variables at once, it is possible to show that significant changes can only be found when the variable *Eu*<sup>1</sup> is included. By way of example, response surfaces varying *Eu*<sup>1</sup> and *El*<sup>2</sup> on one side and *El*<sup>1</sup> and *El*<sup>2</sup> on the other are shown in Figure 3a,b, respectively. Values from Table 2 are used for the remaining variables.

**Figure 3.** Response surfaces of (*rA*)*global est* varying *Eu*<sup>1</sup> and *El*<sup>2</sup> (**a**) as well as *El*<sup>1</sup> and *El*<sup>2</sup> (**b**), using values from Table 2 for the remaining operational variables.

Since (*rA*)*global est* could be subject to an error of up to 0.01 g acetic acid·(100 mL·h)−1, we checked whether other combinations of values of the operational variables falling within the ranges imposed by their errors would lead to maximum values over the range 0.26 ≤ (*rA*)*global est* ≤ 0.27 g acetic acid·(100 mL·h)−1. A systematic analysis provided the ranges shown in Table 3. With a 0.2 interval for each variable, such ranges led to a total of 162 combinations of which only 109 (see Table S1 in file "S1.docx" in Supplementary Materials) fell within the previous range of (*rA*)*global est*. However, using all 162 combinations ensured that this variable would be very close to its maximum value: 0.25–0.27 g acetic acid·(100 mL·h)−1. Therefore, any of the 162 combinations would, in theory, lead to the highest possible mean rate of acetic acid formation in the two-bioreactor system—and hence to values of each operational variable falling in the ranges of Table 3.

**Table 3.** Upper and lower end of the ranges over which the operational variables maximized (*rA*)*global est*.


Conversely, minimizing (*rA*)*global est* led to the results of Table 4 (see file "Optimal\_rA.m" in Supplementary Materials). The problem was like that stated in Equations (6) and (7) except that the aim was to minimize (*rA*)*global est* rather than maximize it.


**Table 4.** Values of the operational variables needed to minimize (*rA*)*global est.*

As in the previous case, the error made in modelling (*rA*)*global est* was used to examine the combinations of values of the operational variables, with provision for their errors (see Table 5), leading to minimum values over the range 0.11 ≤ (*rA*)*global est* ≤ 0.12 g acetic acid·(100 mL·h)−1. The ranges of Table <sup>5</sup> for the operational variables, with 0.2 unit intervals, led to a total of 550 combinations only 29 of which provided an (*rA*)*global est* value falling in the previous range of minimum values (see Table S2 in file "S1.docx" in Supplementary Materials). However, any of the 550 combinations ensured that (*rA*)*global est* would fall in the range 0.116–0.135 g acetic acid·(100 mL·h)−<sup>1</sup> and thus be very close to the minimum of Table 4. Therefore, any combination would provide the lowest mean rate of acetic acid formation in the two-bioreactor system and lead to values of the operational variables falling in the ranges of Table 5.

**Table 5.** Upper and lower end of the ranges over which the operational variables minimized (*rA*)*global est*.


Applying the equations obtained in [27] to the other variables (Equations (8)–(16)) provided the estimated values of Table 6 for *Pm est*, *Eu*<sup>2</sup> *est*, *Vu*<sup>2</sup> *est*, *tcycle est*, *Vm est*, *EtOHm*<sup>1</sup> *est*, *EtOHm*<sup>2</sup> *est*, *HAcm*<sup>1</sup> *est* and *HAcm*<sup>2</sup> *est* under the operating conditions maximizing or minimizing (*rA*)*global est*. The ranges of some variables reflect differences due to the influence of *T*<sup>2</sup> —like (*rA*)*global est*, other variables were independent of the temperature in the second reactor, however.

$$\begin{array}{ll} P\_{\text{net}} = & -243.705 + 18.324 \cdot V\_{\text{ul}1} + 72.736 \cdot E\_{\text{I}1} + 21.525 \cdot E\_{\text{ul}1} \\ & - 9.708 \cdot E\_{\text{I}1}^2 - 1.102 \cdot E\_{\text{ul}1} \cdot V\_{\text{ul}1} - 0.534 \cdot T\_1 \cdot V\_{\text{ul}1} \\ & + 0.742 \cdot T\_1 \cdot E\_{\text{I}1} - 0.416 \cdot E\_{\text{I}2} \cdot E\_{\text{I}1} + 0.175 \cdot T\_2 \cdot E\_{\text{I}1} \\ & - 0.12 \cdot T\_1 \cdot E\_{\text{ul}1} - 0.399 \cdot T\_2 \cdot E\_{\text{ul}1} + 0.101 \cdot T\_2 \cdot E\_{\text{I}2} \end{array} \tag{8}$$

$$\begin{array}{rcl} E\_{\text{u2 est}} &=& 14.935 - 5.371 \cdot E\_{\text{u1}} + 0.988 \cdot E\_{\text{u1}}^2 - 0.0592 \cdot E\_{l1} \cdot V\_{\text{u1}} \\ &- 0.456 \cdot E\_{\text{u1}} \cdot V\_{\text{u1}} + 0.0678 \cdot E\_{\text{u1}} \cdot E\_{l1} \\ &+ 0.494 \cdot E\_{l2} \cdot E\_{\text{u1}} - 0.049 \cdot T\_2 \cdot E\_{l2} \end{array} \tag{9}$$

$$\begin{array}{ll} V\_{u2\text{ est}} = & 4.921 + 1.399 \cdot E\_{l2} - 0.59 \cdot E\_{u1}^2 \\ & + 0.665 \cdot E\_{u1} \cdot V\_{u1} - 0.324 \cdot E\_{l2} \cdot V\_{u1} \\ & + 0.172 \cdot E\_{l2} \cdot E\_{u1} - 0.0275 \cdot T\_2 \cdot E\_{u1} \end{array} \tag{10}$$

$$\begin{array}{rcl} t\_{cycle\ est} &=& 518.591 - 156.652 \cdot V\_{\text{u1}} \\ & -6.474 \cdot T\_1 + 13.556 \cdot V\_{\text{u1}}^2 \\ &+ 1.076 \cdot T\_1 \cdot V\_{\text{u1}} - 0.864 \cdot E\_{\text{u1}} \cdot E\_{I1} \end{array} \tag{11}$$

$$\begin{array}{llll}V\_{\text{m cst}} = & 4.306 + 4.739 \cdot E\_{u1} - 0.841 \cdot E\_{u1}^2 \\ & + 0.336 \cdot E\_{u1} \cdot V\_{u1} - 0.0127 \cdot T\_2 \cdot V\_{u1} \\ & - 0.125 \cdot E\_{l2} \cdot E\_{l1} + 0.0326 \cdot T\_2 \cdot E\_{l1} \\ & - 0.0735 \cdot T\_2 \cdot E\_{u1} + 0.0358 \cdot T\_2 \cdot E\_{l2} \end{array} \tag{12}$$

$$\begin{array}{ll}EtOH\_{m1\ cst} = & 2.312 - 0.0932 \cdot E\_{u1}^2 \\ + 0.0191 \cdot E\_{l1} \cdot V\_{u1} + 0.175 \cdot E\_{u1} \cdot E\_{l1} \end{array} \tag{13}$$

$$\begin{array}{ll} \textit{EtOH}\_{\text{m2 est}} = & \textbf{4.327} - \textbf{0.179} \cdot \textbf{E}\_{\text{u1}} \cdot \textbf{V}\_{\text{u1}} \\ \quad + \textbf{0.306} \cdot \textbf{E}\_{\text{l2}} \cdot \textbf{E}\_{\text{u1}} - \textbf{0.0182} \cdot \textbf{T}\_{\text{l2}} \cdot \textbf{E}\_{\text{l2}} \end{array} \tag{14}$$

$$HAc\_{m1\text{ }est} = \begin{array}{r} 9.188 + 0.0932 \cdot E\_{u1}^2 \\ -0.0191 \cdot E\_{l1} \cdot V\_{u1} - 0.175 \cdot E\_{u1} \cdot E\_{l1} \end{array} \tag{15}$$

$$HAc\_{m2\text{ cst}} = \begin{array}{r} 7.227 + 0.177 \cdot E\_{u1} \cdot V\_{u1} \\ -0.305 \cdot E\_{l2} \cdot E\_{u1} + 0.0178 \cdot T\_2 \cdot E\_{l2} \end{array} \tag{16}$$

**Table 6.** Values of the state variables under the operating conditions maximizing and minimizing (*rA*)*global est*.


Based on the previous results, the highest and lowest mean rate of acetic acid production were obtained by using extreme values of some operational variables. Thus, the minimum (*rA*)*global est* value (Table 4) was obtained with the lowest temperature in the first bioreactor (*T*<sup>1</sup> = 28 ◦C), and the smallest values in the ranges of *El*<sup>1</sup> and *Eu*<sup>1</sup> [viz., 4% and 2% (*v*/*v*), respectively]. These results suggest that the smaller the amount of substrate available to AAB and the higher the acidity to which the bacteria are exposed during a fermentation cycle (see *EtOHm*<sup>1</sup> *est* and *HAcm*<sup>1</sup> *est* values in Table 6) are, the less suitable will be the medium for their metabolic action —and hence for acetification. Also, because the volume of medium unloaded from the first bioreactor was quite substantial (*Vu*<sup>1</sup> = 5.75 L), the amount of inoculum remaining in it for the next cycle was considerably reduced, and so was (*rA*)*global est* as a consequence. This result is consistent with those of modelling studies on a single bioreactor using both first-principles and black-box models [8–10,22,23,31,32].

On the other hand, if the aim is to maximize (*rA*)*global est*, the operating conditions should be essentially the opposite of those described in the previous paragraph. As can be seen from Table 6, such conditions resulted in increased mean substrate availability and decreased mean acidity in both bioreactors.

One other interesting conclusion is that *Pm est* is rather different under the conditions maximizing and minimizing (*rA*)*global est* (see Table 6). As expected, the greater (*rA*)*global est* is, the higher will be acetic acid production. However, as shown in the following section, the maximum mean rate did not result in the highest possible *Pm est* level.

## *3.2. Optimization of Pm est*

The variable (*rA*)*global est* possesses a high industrial interest. In practice, however, the aim of a vinegar producing plant is to obtain as much acetic acid per hour of operation (i.e., to maximize the overall production of acid, *Pm*). This variable can be estimated with an error of 0.7 g acetic acid·h−<sup>1</sup> from Equation (8). In this Equation, only three of the operational variables (*El*1, *Eu*<sup>1</sup> and *Vu*1) have a direct influence on *Pm est*, but as explained before in the case of Equation (5), not all the terms in Equation (8) have the same influence on *Pm est* (see Table 7); the higher the value of the statistic *F*, the more significant the term is for *Pm est*; it can be seen from Table 7 that the most influential term is that of *El*1.


**Table 7.** Significance of the terms of Equation (8). (Adapted from Table S3.27 in [27], Supplementary Material ("S3.docx" file)).

Below is described the procedure followed to identify the operating conditions maximizing (the industrial target) or minimizing (an undesirable outcome) *Pm est*.

The procedure of Section 2.3 to develop a MATLAB script to identify the optimum (maximum or minimum) *Pm est* value was used (see file "Optimal\_Prod.m" in Supplementary Materials). The conditions maximizing *Pm est* can be identified by solving Equations (17) and (18), the latter containing the constraints imposed by the values of the experimental variables under the experimental conditions used.

$$\begin{array}{ll}\text{max} & P\_{m\text{ est}}\\ \text{s.t.} & \text{ } \end{array} \tag{17}$$

$$\begin{array}{l} 4.25 \le V\_{\rm u1} \le 5.75\\ 4 \le E\_{\rm I1} \le 6\\ 2 \le E\_{\rm u1} \le 4\\ 28 \le T\_1 \le 32\\ 2.5 \le E\_{\rm I2} \le 4.5\\ 28 \le T\_2 \le 32 \end{array} \tag{18}$$

where *T*<sup>2</sup> is the temperature in the second bioreactor. Table 8 shows the value of each operational variable maximizing *Pm est* and hence the solution to the optimization problem.

**Table 8.** Values of the operational variables needed to maximize *Pm est*.


In a similar way to the previous discussion on (*rA*)*global est*, plotting the response surfaces of *Pm est* varying just a pair of the operational variables at once, it is possible to show that significant changes can only be found when the variable *El*<sup>1</sup> is included. By way of example, response surfaces varying *El*<sup>1</sup> and *Eu*<sup>1</sup> on one side and *Eu*<sup>1</sup> and *El*<sup>2</sup> on the other are shown in Figure 4a,b, respectively. Values from Table 8 are used for the remaining variables.

**Figure 4.** Response surfaces of *Pm est* varying *El*<sup>1</sup> and *Eu*<sup>1</sup> (**a**) as well as *Eu*<sup>1</sup> and *El*<sup>2</sup> (**b**), using values from Table 8 for the remaining operational variables.

Similarly to (*rA*)*global est*, the errors in *Pm est* and the operational variables were used to identify the combinations of variables leading to values over the range 35.9 ≤ *Pm est* ≤ 36.6 g acetic acid·h−<sup>1</sup> (see Table 9). The ranges of Table 9, at 0.2 unit intervals, allowed a total of 4320 combinations to be identified of which 50 provided a *Pm est* value within the previous range (see Table S3 in file "S1.docx" in Supplementary Materials). However, any of the 4320 combinations led to a very high *Pm est* value (32.8–36.6 g acetic acid·h−1, which are close to that range). Therefore, any of the combinations of operational variables at values within the ranges of Table 9 would lead to a near-maximum *Pm est* value.

**Table 9.** Upper and lower end of the ranges over which the operational variables maximized *Pm est*.


Minimizing *Pm est* provided the results of Table 10 (see file "Optimal\_Prod.m" in Supplementary Materials).


**Table 10.** Values of the operational variables needed to minimize *Pm est*.

The combinations of values of the operational variables leading to minimum *Pm est* values over the range 14.7 ≤ *Pm est* ≤ 15.4 g acetic acid·h−<sup>1</sup> were identified similarly to those maximizing this dependent variable. Using the values in the ranges of Table 11 (0.2 unit intervals) provided 360 combinations of which 36 leading to *Pm est* values within the previous range (see Table S4 in file "S1.docx" in Supplementary Materials). However, all combinations led to very low *Pm est* values: 14.6–17.1 g acetic acid·h−1, which are very close to the minimum value.


**Table 11.** Upper and lower end of the ranges over which the operational variables minimized *Pm est*.

Table 12 compares the values of the estimated state variables for the maximum and minimum *Pm est* values.

**Table 12.** Values of the state variables under the operating conditions maximizing and minimizing *Pm est*.


As can be seen, the conditions maximizing *Pm est* were different from those maximizing (*rA*)*global est*. In fact, *Pm est* and (*rA*)*global est* are related by the mean volume of medium, *Vm est*, in Equation (19). Since the bioreactors worked in a semi-continuous mode, the mean volume was dependent on the particular operating conditions and those resulting in the maximum possible values of *Pm est* and (*rA*)*global est* need not coincide (see *Vm est* values in Tables 6 and 12).

$$(r\_A)\_{\text{global cost}} = \frac{P\_{\text{m est}}}{V\_{\text{m est}}},\tag{19}$$

As stated above for (*rA*)*global est*, an increased mean availability of ethanol and a decreased mean acidity boosted acetic acid production (*Pm*). However, ethanol and acetic acid concentrations above certain levels have an inhibitory effect whereas too low levels can even boost bacterial activity. These effects have been extensively examined in modelling studies [8–10,22,23,31,32]. For example, ethanol concentrations above 6% (*v*/*v*) and acetic acid concentrations above 6% (*w*/*v*) have been found to have substantial inhibitory effects [8–10]. This knowledge, and the mean acidity and ethanol values of Tables 6 and 12, allow the (*rA*)*global est* and *Pm est* results to be more easily understood.

One other major inference is that, based on Table 12, maximizing *Pm est* leaves a substantial amount of unavailable ethanol in the second bioreactor [*Eu*<sup>2</sup> = 4.3% (*v*/*v*)], which is, in general, industrially unacceptable. It is, therefore, interesting to identify the specific conditions that will maximize *Pm est* while ensuring that the substrate is depleted to an acceptable degree. The procedure followed for this purpose is described in the following section.

#### *3.3. Optimizing Pm est While Ensuring Enough Substrate Depletion*

For economy and legal reasons, the amount of ethanol present in industrially produced vinegar must not exceed prescribed levels depending on each specific type of vinegar. It is therefore important to identify the operating conditions optimizing acetic acid production (*Pm est* in Equation (8)) under a constraint on the ethanol concentration at the time the second bioreactor is unloaded (*Eu*<sup>2</sup> *est* in Equation (9)). The optimization problem is stated in Equations (20) and (21).

$$\begin{array}{ll}\text{\(\mathbf{m}\mathbf{a}\mathbf{x}\)}\;P\_{m\;\;est}\\\text{\(\mathbf{s}.t.}\end{array}'\tag{20}$$

$$\begin{array}{l} 4.25 \le V\_{\rm til} \le 5.75\\ 4 \le E\_{\rm l1} \le 6\\ 2 \le E\_{\rm til} \le 4\\ 28 \le T\_1 \le 32\\ 2.5 \le E\_{\rm l2} \le 4.5\\ 28 \le T\_2 \le 32\\ E\_{\rm u2} \, \text{est} = \text{constant} \end{array} \tag{21}$$

where *constant* is the ethanol concentration at unloading time in the second reactor to be imposed.

Table 13 shows the values of the operational variables providing the solution to the previous problem with *Eu*<sup>2</sup> *est* values from 0.2% to 1.5% (*v*/*v*).

**Table 13.** Values of the operational variables needed to maximize *Pm est* with an *Eu*<sup>2</sup> *est* value of 0.2%, 0.5%, 1.0% or 1.5% (*v*/*v*).


The solution was obtained by using the MATLAB script of Section 3.2 (see file "Optimal\_Prod.m" in Supplementary Materials) as expanded with the constraint on *Eu*<sup>2</sup> *est*. The previous range of *Eu*<sup>2</sup> *est* was used to consider virtually complete and less marked depletion of the substrate because some vinegars (particularly those under a designation of origin or aged in casks) are allowed to contain higher levels of residual ethanol.

As expected, the greater *Eu*<sup>2</sup> *est* was (i.e., the less markedly the substrate was depleted in the second bioreactor), the more favored was AAB activity and the higher was acetic acid productivity as a result.

#### *3.4. Comparison of the Performance of Serial and Parallel Bioreactors*

This was one other point of especial interest. For this purpose, we compared the results obtained with the two bioreactors working in series here and those previously reported for others operating in parallel [8–10,22,23,31,32]. Because the previous studies were conducted at 31 ◦C, we estimated *Pm* and *Eu*<sup>2</sup> at that temperature. As can be seen from Table 14, there were no substantial differences in performance between the serial and parallel configurations when *Pm* was maximized under no constraint on *Eu*2—not even at the optimum *T*<sup>1</sup> and *T*<sup>2</sup> values found here. However, maximizing *Pm* with *Eu*<sup>2</sup> = 0.5% (*v*/*v*) resulted in the serial system being more productive than the parallel one. Specifically, at 31 ◦C the former system reached a *Pm* 12.2% higher than did the latter. It was impossible to directly compare productivity with the two systems at 32 ◦C and *Eu*<sup>2</sup> = 0.5% (*v*/*v*) because no productivity data for the parallel system at that temperature were available. In any case, the results of Table 14 suggest that they cannot be too different from those obtained at 31 ◦C.


**Table 14.** Comparison of acetic acid production and final ethanol concentration at the time of unloading with two bioreactors operating in series and in parallel.

> Finally, it should be noted that using two serial bioreactors results in very high acetic acid productivity and virtually complete depletion of ethanol. On the other hand, as shown in a previous work [16], depleting the second bioreactor in a system operating in parallel would slow down the process as a result of the time needed for acetic acid bacteria to regain full activity after a period of substrate scarcity and a high acidity in the medium—all of which considerably detract from productivity [16].

#### **4. Conclusions**

The two serially arranged bioreactors system for the acetification process has been optimized in various respects using previous quadratic polynomial models. The values of the operational variables maximizing or minimizing the mean rate of acetic acid production were obtained: a maximum value of (*rA*)*global est*= 0.27 g acetic acid·(100 mL·h)−<sup>1</sup> was achieved when *Vu*<sup>1</sup> = 4.25 L, *El*<sup>1</sup> = 6% (*v*/*v*), *Eu*<sup>1</sup> = 3.07% (*v*/*v*), *T*<sup>1</sup> = 32 ◦C, *El*<sup>2</sup> = 4.5% (*v*/*v*) and a minimum value of (*rA*)*global est* = 0.11 g acetic acid·(100 mL·h)−<sup>1</sup> was achieved when *Vu*<sup>1</sup> = 5.75 L, *El*<sup>1</sup> = 4% (*v*/*v*), *Eu*<sup>1</sup> = 2% (*v*/*v*), *T*<sup>1</sup> = 28 ◦C, *El*<sup>2</sup> = 4.5% (*v*/*v*).

In addition, the conditions leading to the maximum and minimum productivity were: *Pm est* = 36.6 g acetic acid·h−<sup>1</sup> was achieved when *Vu*<sup>1</sup> = 4.25 L, *El*<sup>1</sup> = 5.1% (*v*/*v*), *Eu*<sup>1</sup> = 4% (*v*/*v*), *<sup>T</sup>*<sup>1</sup> = 32 ◦C, *El*<sup>2</sup> = 4.5% (*v*/*v*), *<sup>T</sup>*<sup>2</sup> = 28 ◦C and *Pm est* = 14.7 g acetic acid·h−<sup>1</sup> was achieved when *Vu*<sup>1</sup> = 5.75 L, *El*<sup>1</sup> = 4% (*v*/*v*), *Eu*<sup>1</sup> = 4% (*v*/*v*), *T*<sup>1</sup> = 31.9 ◦C, *El*<sup>2</sup> = 2.5% (*v*/*v*), *T*<sup>2</sup> = 32 ◦C.

The operating conditions needed to maximize productivity while ensuring ethanol depletion to a preset degree were also identified: 4.25 ≤ *Vu*<sup>1</sup> ≤ 4.76 L, *El*<sup>1</sup> = 5.2% (*v*/*v*), 2.3 ≤ *Eu*<sup>1</sup> ≤ 3.2% (*v*/*v*), *T*<sup>1</sup> = 32 ◦C, *El*<sup>2</sup> = 4.5% (*v*/*v*), *T*<sup>2</sup> = 32 ◦C to achieve 34.6 ≤ *Pm* ≤ 35.5 g acetic acid·h−<sup>1</sup> with 0.2 ≤ *Eu*<sup>2</sup> ≤ 1.5% (*v*/*v*). Such conditions allowed near-maximum productivity to be obtained.

One other aim fulfilled by modelling the system and using results of previous research work was to compare the performance of the system with the two reactors operating in series and in parallel. *Pm* can be maximized with no restrictions on *Eu*<sup>2</sup> by using either configuration. However, if the substrate is to be depleted [e.g., *Eu*<sup>2</sup> = 0.5% (*v*/*v*)], then the serial configuration will be more productive.

**Supplementary Materials:** The following are available online at http://www.mdpi.com/xxx/s1. "Optimal\_rA.m" and "Optimal\_Prod.m": MATLAB scripts for optimizing (*rA*)*global est* and *Pm est*, respectively. File "S1.pdf": Combinations of operational variables to analyze the maximum and minimum of (*rA*)*global est* and *Pm est*.

**Author Contributions:** Conceptualization, I.G.-G.; methodology, C.M.Á.-C., I.M.S.-D. and I.G.-G.; formal analysis, C.M.Á.-C., I.M.S.-D., J.E.J.-H. and I.G.-G.; data curation, C.M.Á.-C. and I.M.S.-D.; writing—original draft preparation, J.E.J.-H. and I.G.-G.; writing—review and editing, J.E.J.-H., I.G.-G. and I.M.S.-D.; funding acquisition, I.G.-G. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was funded by "XXIII Programa Propio de Fomento de la Investigación 2018" (MOD 4.2. SINERGIAS, Ref XXIII. PP Mod 4.2) from University of Córdoba (Spain) and by "Programa PAIDI" from Junta de Andalucía (RNM-271).

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