Control automático y supervisión remota de un biorreactor

Resumen.El diseño cuidadoso de un sistema de biorreactor regulado, eficiente, escalable y portátil para el análisis de una variedad cada vez mayor de procesos biológicos y químicos es actualmente de suma importancia para el desarrollo de la Biotecnología. La interacción mutua existente de las variables involucradas dificulta la optimización del sistema e insta a la necesidad de integrarlo con un alto rendimiento y adaptabilidad contra los cambios en respuesta a diferentes características. En el documento se propone un método validado para la regulación de la velocidad de agitación y temperatura del biorreactor, así como el pH del compuesto mediante técnicas tradicionales basadas en ON-OFF, integradores, derivadores y controles Fuzzy. El sistema resultante permite su configuración y supervisión ya sea local o remotamente con encriptación, gestionando apropiadamente el contenido almacenado e intercambiado entre dispositivos.


1.
Introduction.-Bioreactors are the main units of operation for the industrial biochemical transformation in which the treated materials promote biological transformation by the action of living cells or by cellular components such as enzymes [1]. They consist of standard systems in either size and functionality composed of a complex set of pipes, fittings, cables, sensors and actuators where the fermentation process and all its consequent biological reactions are carried out, causing a major design challenge for individuals of the area who need to make a prior intensive analysis of the compound to be processed. This is justified by the differential behavior of each reaction the system ought to put through, estimating and considering the interactions with substances or unavoidable elements of the environment that are often unwanted. With the objective of optimizing cell growth in order to obtain a reduction in fabrication and commercialization times, new types of bioreactors technologies are constantly being developed to continue improving productivity, pursuing the most efficient expression of the biological properties of usual microorganisms to achieve more favorable interactions between cells and culture media [2]. This is obligatory sought in a tightly controlled environment, providing efficient means of mixing, mass transfer and heat between the different bioprocesses phases with both complex non-linear and dynamic properties and delicate environment conditions.
The control of a bioreactor takes into account several variables that influence each other in distinctive degrees, such as the pH of the sample, the temperature of the compound, the level of dissolved oxygen and the speed of the agitation. Each variable affects the study compound differently and must therefore be considered and treated differently. Thus, it is proposed an automatism composed of multiple controllers that allow to regulate and modify the aforementioned relevant variables of the system.
The desired automation is mainly focused on maintaining an acceptable and stable performance though considering the organisms standard growth conditions and rapid adaptation of the systems response against unscheduled changes generated by the environment or the organic reaction itself. As shown in Figure I, the architecture of the proposed system is centralized in a master controller located in a Raspberry Pi, on which to develop the main controllers, user management and auxiliary functions, as well as the web server for remote supervision. This master controller communicates with slave controllers consisting of both traditional Arduinos and various devices of tertiary companies. This chosen design is argued by its simplicity and coherence, seeking general control focused on a single device that is responsible for the processing and delegate of data and information. This decision also facilitates the use, scalability, ordering and maintenance of the entire system by any operator. In addition, the Raspberry Pi is preferable as a central component due to its economical advantages and its large amount of available documentation and libraries that make it extremely versatile and usable. This arrangement also responds to the decided premise of using a controller for each control parameter, thus being able to future expansion both in spatial redundancy and using sensors and/or actuators of other magnitudes.

Agitation Velocity Control.-
The decided first magnitude to control is the system rotation speed with which to agitate, being of utmost importance in all bioprocesses in order to achieve a complete mixture of the components and adequate aeration of the cells of the study compound, mandatory when using aerobic organisms [3]. Oxygen requirements generally depend on the energy of the processes steps leading to the product and, because oxygen uptake is linked to cellular metabolism, oxygen dynamics reflect changes in environmental conditions. In this respect, the main factors of the design of a bioreactor that influence agitation are its shape, the number and arrangement of the blades used, the speed required, the dimensions of the container and the depth of the poured compound.

Agitation
Peripherals.-For the measuring of the speed, it is used a customized system consisting of rotating a grooved disc attached to the motor shaft represented in Figure II (a), justified by expensive design alternatives concerning the adaptation of the encoder. The sensing of the actual agitation speed of the motor is made by timing each 100µs for native interruptions of the Arduino and collecting the counter as long as the hole in the slotted disk is not detected. Once the groove is detected, the calculation is carried out to calculate the speed at which the disk is fixed to the shaft and therefore the rotation of the motor. As displayed in Table I, this method achieves in measuring asynchronously the rotation speed of the blades, getting a heterogeneous error in the working range. This also involves that the first round of the disk must necessarily be discarded in order to continue with the magnitudes correct measurements.
Having considered several possible actuators such as universal motors and analog overhead stirrers with DC motors, it remained preferable to use an industrial induction motor with distinguishing characteristics like availability for high torque and flexibility in times of use, enabling its continuous operation for consecutive days. This 6 poles triphasic engine has its speed regulated by the setup of an attached Variable Frequency Drive (VFD) with multiple internal registers to configure remotely using Modbus RTU. While testing its performance it is on one hand observed the precision reached is not entirely acceptable for accurate usage, keeping a variable error throughout the working range which normally increments when in lower velocities as presented in Table II. On the other hand, after an average delay of 1 second as viewed in Figure II (   It is therefore proposed to use an adapted integrative control that allows an integrating parameter variation depending on the objective values and consequent steps to be made. This process of adaptation or tuning of the parameters of the integrator is carried out experimentally and in a multitude of compounds of varied viscosity. Likewise, a deadband of 1.0 rpm is used with respect to the objective due to the VFD precision, simultaneously seeking to avoid a permanent oscillation of the input variable to the system, achieving an acceptable precision and obtaining the results displayed in Figure IV and Table III  -This second magnitude studied is mainly determinant in the speed or rate of the cell growth process, existing for different microorganisms and each stage of the fermentation a known optimum temperature range, found by the scientific community experimentally [4]. In the treated processes, in case of maintaining the temperature of the organism constant throughout the fermentation, it would not be necessary to implement any feedback control, since it would be enough to determine its optimum value. However, in practice there are multiple internal biochemical reactions which are system and compound specific and can cause abrupt and arbitrary temperature changes that are difficult to predict accurately.

Thermal Behavior Analysis.-
The defined temperature control subsystem consists of a duly protected RTD Pt100 sensor with OneWire interaction and 0.05 • C precision as well as an external bath circulator with same internal sensor type and consequent Fuzzy control of inner fluid. The heat transfer to the study compound occurs through an outer jacket of stainless steel that is connected to the circulator by means of aluminum-coated pipes capable of withstanding the 90 • C required particularly for the system pasteurization and sterilization. This lays the path to several bidirectional interactions that affect the system thermal response such as energetic losses by contact, notorious initial delay response and thermal inertia, as represented in Figure V.  Once analyzed throughout the 5 • C to 95 • C range, it is observed that the bioreactor temperature steady state value does not necessarily reach every time the actuator setting point as displayed in Table IV, arriving at the thermal equilibrium at the value collected in the container considering the losses and filtrations inherently existing. These differences are more notorious the greater the set target, existing sparse discrepancies at low values. With regard to transient time, no such variation is found in the work range considered, with an average time of 400 seconds in 2 • C to 10 • C steps and with subtle longer duration in initial steps when heating or cooling.

Temperature Control
Explanation.-At the moment of designing the temperature control logic, and considering satisfactory the response characteristics observed when acting the circulator Fuzzy control, it is proposed to perfection its influence on the general system.
As shown in Figure VII, the control system design is based on integrators and derivatives developed in floating control mode in a neighborhood of 3.0 • C and a deadband of 0.2 • C in order to avoid unnecessary thermal circulator over-use and prevent often visualized permanent oscillation of the response by temperature. Outside this interval, the own circulator control is used in its usual mode. This limitation is found to be motivated by the desire to evade as much as possible periodic modifications to the actuator behavior, in order to reduce the probabilities of failures both in communication and in the equipment nominal operation. In the same way, the floating control is simultaneously limited by time as soon as a more frequent and excessive action is detected when approaching the configured target value. This restraint is defined in 90 seconds, therefore the conditions must be fulfilled in both time and temperature to allow a change in the action on the actuator. This adaptation and selection of parameters achieved throughout the usual work range work is benefited by the slowness of the observed behavior as displayed in Figure VIII, which helps dealing with occasional random factors.   [5]. In order to mitigate abrupt changes in pH and as a secondary measure, it is common to use buffer components, in order to maintain the level of acidity or alkalinity of a substance exposed to chemical reactions, trying to avoid generating unwanted reactions. This use of conjugates is what gives these solutions their characteristic resistance to changes in pH, since it creates a balance between acid and base that is difficult to overcome by other acids or bases. However, when these changes in pH exceed the known capacity of the buffer, the break occurs, after which the pH will vary radically as if no auxiliary solution is used.

Ph Response Examination.-
For the performance of the pH Control it is used two peristaltic pumps controlled by PWM with corroborated 68µL per drops of acid or base and an electrode sensor of 0.002 value precision interacted with I 2 C, capable of validated with standing temperatures from 0 • C to 50 • C. So as not to use high resources volumes unnecessarily, it is proposed a system scaling which delegate equivalent results in consequence of the relative correlation of substances behaviors to be examined in terms of the buffer solutions concentration and the acids and bases molarities. It is then proceeded to execute sufficient experiments at various intervals in order to have an adequate knowledge of the system characteristics in terms of their behavior against pH variations, using mainly 1 M solutions of phosphate buffer (KH2PO4), sodium acetate (C2H3NaO2), lacteal medium and proprietary blends with yeasts. According to these experiences, the existence of several markedly different sensitive areas is appreciated as shown in Figure IX and Table V, favored by the actuators immediate action on the pH, making it impossible to collect intermediate values between two contiguous points.

ON-OFF control
Applications.-Based on the results of previous experiences, an ON-OFF control is proposed, deciding the action according to the current pH error sign and system sensitivity as represented in Figure X. Consequently, it is determined the number of drops necessary to maintain the pH value in a neighborhood of acceptable precision, estimated based on the defined area in which the compound is located at the measuring moment. It is preferred at all times the use of the minimum necessary amount of acid and base to prevent quickly emptying the recipients carrying the aforementioned performers, while cautioning avoid oscillations. Then, a 0.05 deadband is used and a minimum time between expulsions of 6 seconds. This leads to satisfactory results shown in Table VI and Figure XI.
In order to enable a user customization on the control and provide tools to increase the flow or speed of the droplet ejection, the actuator is designed to allow variation of interval and number of drops per burst.
It is then proceeded to compass the same experiments on the buffer solutions, observing a sufficiently acceptable resulting behavior but with a target arrival time greater than the previous ON-OFF control, which refers to have a more satisfactory adaptability to noted changes. These considerations relate to the complexities of general optimization of Fuzzy parameters.

Remote Management.-
The security of the data displayed to the user satisfactorily guarantees the authenticity and integrity of the information, using symmetric encryption by AES-256 ciphered by blocks according to CBC with padding PKC#7 and hash authorization according to HMAC-SHA256, ensuring in turn the correct compatibility between both ends of the remote and local server [7]. This protection manages to avoid access by any user to restricted data of the system (such as information from other users, equipment reservations, fermentation, system status, histories) and that they can only be viewed, used and edited through the interfaces provided in the system, by those users who are authenticated and have the authorization for such actions. For this purpose, it is decided to encrypt and decrypt the sensitive content once closed and the application started respectively, with backups periodically every hour from the start of the program in case of prolonged use.
The communication between processes and with the global program is carried out through shared memory due to its low probability of access collisions and the impossibility of blockages due to readings and writings that are not synchronized between ends. In addition, the slower access of this method of communication is not problematic as it does not result in extreme accuracy in the response times and pursuit of data refreshments on the screen of 10 seconds of interval (for a normal duration of the 1-week process).
As shown in Figure XIV, the relevant information is organized in system and controls data, with respect to the relevance of the same for the registration and later visualization of the registered results, or for the correct functioning of the system.   Both types of data are therefore treated differently in terms of the protection provided (those inherent to the overall operation had to be coded and authenticated), being equally accessible by the instrument operator.
The system sensitive data makes use of the JSON database format in such a way to simplify its reading by the remote server and the understanding of the data stored in the local console, with ease of future expansion. Similarly, the controls general data correspond to strings of raw numerical values without protection ordered according to a determined structure that respond to the results obtained from the peripheral sensors and actuators. This information of the controls allows knowing the characteristics of the current state of the same and the evolution of the corresponding parameters of interest of the present fermentation, initializing a new file in each initialization of the control. For the latter records it is not considered necessary to use a particular database because of the need for a quick reading of the information and for the low amount of data that is normally used. 6. Conclusion.-The proposed control system successfully achieves in automatically regulate main bioprocesses parameters like agitation speed, temperature and compound pH. The former meets a maximum nominal error of approximate 0.8% with superior 0.1% accuracy, while the temperature reaches an average overdraft of 4.0% and a maximum steady state error of 2.7%. The latter particular behavior facilitates the implementation of two possible controls with similar results. Finally, the globally affordable system design makes place for future possible improvements and addition of new control parameters.