Principles of Instability and Stability in Digital PID Control Strategies and Analysis for a Continuous Alcoholic Fermentation Tank Process Start-up

Some professionals in the industrial community are not as familiar with digital PID controllers as the analog one. So the art work of this present paper is to show properly conditions and aspects to reach stability in the process control, as also to avoid instability, through the use of digital PID controllers, with the objective of help the industrial community. The discussed control strategy used to reach stability is to manipulate variables that are directly proportional to their controlled variables. To validate and to put the exposed principles into practice, it was done two simulations of a continuous fermentation tank process start-up with the yeast strain S. Cerevisiae NRRL-Y-132, in which the substrate feed stream contains different types of sugar derived from cane bagasse hydrolysate. These tests were carried out through the resolution of conservation laws, more specifically mass and energy balances, in which the fluid temperature and level inside the tank were the controlled variables. The results showed that if the exposed proceedings are followed, the system stabilize without difficulties.


Introduction
Analog PID controllers are used in the industry because of its facility in about tuning the parameters (proportional, integral and derivative) and other advantages, but two of the negative points of these controllers are the manipulated variables' kick and oscillation, hindering the practical plant control, increasing maintenance costs and promoting undesired oscillations.PID controllers was a matter of study and concerned by many researchers (e.g.[3,[13][14][15][16][17]) due to its importance since its origin till nowadays and in the future.
Another weak point of using analog controllers is that they are not able to make plants start-up without difficulties, since they depend of fixed setpoint values for the manipulated variables.One example is the start-up of an empty tank, in which if the outlet flow rate have a setpoint value equal to the inlet flow rate, the system will not accumulate fluid, so it will remain empty.
Digital PID controllers may lead to instability in plenty situations if they are bad tuned, but one thing that also harms the process control is a wrong chosen strategy, in which can lead to instability even if the process design itself naturally tends to be stable.Despite of these situations, these controllers lead to a cheap, simple and efficient process control if well implemented.
So the main objectives of the present paper are to help the community by showing a properly configuration for a digital PID control strategy to execute a stable process control and also to explain a principle of instability.These objectives were validated with two simulations, in which it is controlled: The temperature and the fluid level inside an alcoholic fermentation tank that is being fed with yeast strain Saccharomyces Cerevisiae NRRL-Y-132 and a substrate stream of sugar coming from cane bagasse hydrolysate.Both simulations relate to the process start-up, where the first simulation lead to instability and the second to stability.
The first tank in a traditional continuous alcoholic fermentation (Figure 1) process must have more attention than the others due to the higher liberated heat, being a reasonable justification to be the object on scope.The growth medium in most likely S. Cerevisiae strains, must have the temperature between 301 and 307 K, so they can reproduce without stress and denaturation.The heat liberated during alcoholic fermentation process was first studied by Berthelot (1860) [10], and then by Rechenborg and other authors (e.g.[11,12]), but Bouffard made directly experiments with dextrose and studied it more precisely, finding a more real liberated heat value during alcoholic fermentation, and so then used here in the simulations [1].So a bad control strategy or a bad tuned PID controller can overheat the system, killing yeast cells and thus destroying the process.The first fermentation tank design with its streams is shown in Figure 2: Due to the high importance, utility and application of ethanol in manufacturing chemical products and using it as a bioenergy source, many researchers (e.g.[18][19][20][21][22]) studied its dynamic on behalf of optimization and simulations to help its industrial application to understand the particularities of the production process and then to improve its efficiency.But as far as it is known there are no plenty researches involving PID controllers (mainly the digital) in the alcoholic fermentation process control, maybe is because it is not a simple task to be done specifically to this process.Regarding this fermentation process, it was possible to reach stability by following the principles exposed in this paper, which are the main objectives discussed in the present research.

Notable Principles in Digital PID Controllers
It is stated a principle of instability in digital PID controllers here, which means that when a variable is controlled (C.V.) by a manipulated variable (M.V.) in such a manner that if M.V. grows C.V. decreases, or when even the counter is true, it implies on saying that the C.V.
will diverge in direction of plus infinity or minus infinity.A wise way to avoid instability and to reach stability in the setpoint value, is to choose a M.V., in which when it grows, the C.V. also grows (directly proportional), or when the counter is also true.
When PID parameters are positive and C.V. is inversely proportional to M.V., as says the mentioned principle of instability, the exact moment that the C.V. goes through instability (will never stabilize in the setpoint value) is when the error (the setpoint value subtracted from the dynamic value) starts to have a negative value.This happens because M.V. decreases, while it should increase to realize the control.In the case that PID parameters are negative, the instability point will happen when the error start to have a positive value, due to the fact that M.V. increases while it should decrease to realize the control.In the present paper this is proved through the simulation, and the instability is clearly noted in the graphs of the temperature and the fluid level.
So it is not secure to implement a project with a digital PID control strategy that depends of only positives values of the error (if PID parameters are positive) or neither of only negative values of the error (if PID parameters are negative).If the PID parameters are badly tuned, the error is more likely to get both negative and positive values during the process execution, implying the need of a good control strategy, which is, M.V. must be directly proportional to C.V..

Modeling the System
Since stream 2 of the Figure 2 is an outlet flow rate, it does not exchange heat with the content inside the tank, because they are not mixing.The variation of temperature occur due to the heat exchange and is expressed by the energy balance written in the form of heat balance for a perfect mixture tank and is represented by Equation (1): In which: Overall mass balance: Mass balance for the cells: Mass balance for the substrate: Mass balance for the product: Xylose, cellobiose and other types of sugars are present in the medium, but they act like inhibitors and do not take part in the fermentation.See [2] for more details about the kinetic model of the yeast strain S. Cerevisiae NRRL-Y-132 fermenting cane bagasse hydrolysate to produce ethanol, which is used on this paper simulation.The kinetic rates are: In which: Temperature error: Fluid level error: Average heat capacity: The control strategy used in the first start-up simulation was to manipulate variables that are inversely proportional to their controlling variables: 1-Manipulate v2 to control the fluid level; 2-Manipulate v3 to control the temperature of the fluid inside the tank.
The digital PID temperature (Equation 16) and level (Equation 17) controllers of the first simulation use the velocity form equation of expanded PID controllers [3]: The control strategy used in the second start-up simulation was to manipulate variables that are directly proportional to their controlling variables: 1-Manipulate v1 to control the fluid level; 2-Manipulate Q3 to control the temperature of the fluid inside the tank.
The plant commonly does not have a final control element that manipulate heat (Q3), and since T4 is specified because in the practice this temperature will be controlled by the heat exchanger showed in the Figures 1 and 2, v3 will be manipulated to control the tank temperature.
Since Q3 depends of v3, as showed in Equation ( 4), the controller in the plant must have an equation to calculate the value of v3 that will be manipulated, in which the equation is derived from Equation (4): In the second simulation it has also a condition, which is to equalize the value of v2 into a project value when the fluid level first reach the setpoint value.In terms of process control, the system interprets this as a step gain in v2.The digital PID temperature (Equation 19) and level (Equation 20) controllers of the second simulation also uses the velocity form equation of expanded PID controllers: The Table 1 below shows the parameters values used in the simulations: −1 180/7 = 25.7143m 2 - The Table 2 shows the parameters values of the digital PID controllers used in the simulations: It was tested values other than zero for all the derivative terms constant and the principle of instability remains with the same philosophy, theoretical basis and validity.The reason why no value has been entered for the derivative term is to make a simulation that would diminish the wear of the final element control (the valve), since it has no need to accelerate the process control because it is a startup simulation and it is not possible to accelerate the yeasts performance by modifying its genetics using PID controllers.

Simulating the System
The system was simulated two times in MATLAB® (R2015a, Mathworks, Natick, MA, USA): The first was the one that caused instability, and the second caused stability.In both simulations, the fermentation has a lag phase of 10800 seconds (3 hours), which is commonly the real lag phase time in alcoholic fermentation tanks with S. Cerevisiae.In this phase it was specified that both kinetic rate of product formation and cell growth had 5% of the integral value, while substrate kinetic rate had 10%.So after lag phase, all kinetic rates had 100% of their integral value, represented by Equations ( 9), ( 10) and (11).
For the simulation purpose, it was chosen a temperature setpoint equal to 302 K as an optimum temperature of cell growth, like it happens e.g. for the yeast strain S. Cerevisiae CICC 1302 or 1308.The Table 3 below shows the initial conditions values for the execution of the first simulation: The Table 4 shows the initial conditions values for the execution of the second simulation: Project value for v2 when the fluid level first reach the setpoint value 0.0278 m 3 .s - In both simulations were put disturbances in  1 value, which happens constantly, i.e.
each second, and is represented by Equation ( 21), in which RAND is a random number between 0 and 1: And in each ten seconds, it were put disturbances in  1 and  1 values (Equations 22 and 23): 1 = 0.45 •  + 301 (23)

Instability in the First Simulation
As it is mentioned in the principle of instability, the exact moment that the temperature (Figure 3) starts to go through instability and diverges to the direction of minus infinity is when the error starts to get negative values.This happen because in the heat balance equation, the term ( 4 −  −1 ) and the term ( 1 −  −1 ) can get negative values if  −1 >  4 ,  1 , and when the error also starts to get negative values, v3 value starts to decrease (calculated by Equation 16), while it should increase to control the temperature inside the tank.This happen with same analogy for the fluid level (Figure 6), and v2 (Figure 4) starts to decrease when the error starts to get negative values, while it should increase to control the level.That is, the fluid level is naturally inversely proportional to v2, and the fluid temperature inside the tank ( −1 ) is inversely proportional to v3 (Figure 5), composing the reasons to reach instability and divergence as says the principle exposed in this paper.
Choosing this strategy for the digital PID controllers, the C.V. will never reach stability in the setpoint value, because the chosen manipulated variables are not directly proportional to their controlled variables (fluid level and temperature).
Since the system is instable, the fluid temperature and level, the cell (Figure 7), substrate (Figure 8) and product (Figure 9) concentrations will diverge and the results are not physically real.v3 and v2 also diverge and they get negative values also, which is physically impossible, and the temperature graph violates the second law of thermodynamics, that is, most of these instability problems would not occur in the practice, but the system is certain to be instable and to cause several critical errors i.e. tank inundation, pump cavitation, null production, yeasts' death etc.

Stability in the Second Simulation
When Q3 (Figure 11) and v1 (Figure 13) are manipulated to control respectively the fluid's temperature (Figure 10) and level (Figure 15), the system easily reach stability.Even if the controller is bad tuned and PID parameters are positive, v2 (Figure 14) and v3 (Figure 12) will not have negative values, different case compared to the first simulation control strategy.
The second simulation will never lead to negative values for v1 and v3, because v1 and Q3 is directly proportional to their response variables (h and TT-1), leading to stability and convergence as already justified.The simulation has converged to the setpoint values, both in the temperature and fluid level, eliminating then the offset value commonly generated in some cases, especially when analog PID control strategies are used.
The temperature has an absolute value of overshoot equal to 1.2 K, reaching a tolerable temperature of 303.02K and becoming stable right after.As early mentioned, and as part of the control strategy, v2 obtain a step gain that would cause instability in the system if the control strategy was badly chosen and if the digital PID controller was badly tuned, which did not happen.
As the system stabilized at the setpoint values of the temperature and the fluid level, the substrate (Figure 16), cell (Figure 17) and product (Figure 18) concentrations reach the steadystate with values equal to 28.668, 7.052 and 27.055 Kg.m -3 , respectively, which are the same value of when calculated through the given cell's and ethanol's yield factor.Closed-loop PID controllers tuning strategies were studied from several years till nowadays, and motivated plenty of researches (e.g.[13,[23][24][25][26][27][28][29]).By using the discussed principles which lead to stability in the plant's digital feedback controllers, the tuning of the digital PID controllers is not a matter of concern, since with a trial and error method or other of the literature's tuning methods, the feedback controller is tuned.Clearly, the exposed principles can even give assistance on reaching an easier controller's tuning.

Conclusions
It was discussed digital PID control strategies to state principles of instability and stability that lead the process to divergence or convergence in the setpoint value of a controlled variable.The instability and stability promoted by these principles were studied in two simulations of a continuous alcoholic fermentation tank process start-up being fed with yeast strain S. Cerevisiae NRRL-Y-132 and a stream of sugar derived from cane bagasse hydrolysate.
It is clearly visible from the results of both process start-up simulations that manipulating variables that are directly proportional to their controlled variables, makes the system get stable in the setpoint values.Since how to reach stability using digital PID controllers is well explained and justified, these strategies can be used in all industrial branches, with the objective of control the process by reaching the desired specifications and dodging analog controller's weak point (avoiding the use of them) and even to facilitate the PID controller's tuning.
Acknowledgments: I gratefully thanks CNPq for the financial support.

Conflicts of interest:
The author declare no conflict of interest.
Funding: This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.
Nomenclature (in order of appearance)

Figure 10 :
Figure 10: Fluid temperature inside the tank in the second simulation (stable).

3 1 Volumetric flow rate of stream 1 𝑇 1 Temperature of stream 1 𝛼 4 Temperature of stream 4 𝑣 2
Heat exchanged between Stream 4 and the fluid inside the tank  −1 Fluid density inside the tank  −1 Heat capacity of the fluid inside the tank ℎ −1 Fluid level  −1 Circular area of the cylindrical tank's base  Heat liberated per kilogram of processed sugar   −1 Substrate consumption rate  3 Volumetric flow rate of stream 3  Volumetric flow rate of stream 2

Table 4 : Initial conditions values for the execution of the second simulation. Variable Initial value
−1Cell concentration inside the tank