## 2 Materials and Methods
### Experimental Setup
#### 2.3.1 BR\({}_{1}\) (Hydrogen) Control System  
As a result of several months of experiments, it was found that the pH of the medium of hydrogen BR\({}_{1}\) is constantly changing in both directions (towards acidification and alkalization). It was found experimentally that with the formed bacterial community, the optimal pH range is in the range 5.0-5.5. At pH values below 5.0, the hydrogen production process stops, and at values above 5.5, the process often deviates to methane formation. At long intervals, pH adjustments with sodium hydroxide and hydrochloric acid were made manually, but this proved unsuccessful and led to the deterioration of the processes. Therefore, pH regulators have been developed in two variants--hardware (classic) and software (with the specialized LabVIEW package).  
Figure 3: General view of BR\({}_{2}\), GH, and measuring board.  
Figure 2: Hydrogen producing BR\({}_{1}\) with auxiliary equipment.  
For the measurement of pH and oxidation-reduction potential (rH) in real time, a flow cell was constructed and fabricated, and the circulation of the culture medium from the hydrogen BR\({}_{1}\) through it can be carried out continuously or at set intervals by means of a peristaltic pump. After appropriate adjustment of the parameters of the pH controller with hysteresis, the necessary pH stabilization (with the addition automatically of sodium hydroxide and hydrochloric acid in appropriate concentrations using two peristaltic pumps) was achieved in the specified optimal range.  
A system for monitoring and controlling hydrogen-producing BR\({}_{1}\) from organic waste has been developed and tested. A personal computer and the LabVIEW software package were used for the implementation.  
The system with a software sensor for the specific growth rate of microorganisms and biomass, with the possibility to control the process, with an interface, is shown in Figure 4.  
Possibilities are provided for recording the measurements of the next process parameters: current time period from the beginning of reporting, cultivation temperature, and pH in the bioreactor; content of H\({}_{2}\) and CO\({}_{2}\) in the obtained biogas; biogas flow rate per day; biogas flow for one period of time (for example, for 1 h).  
The system has the ability to automatically control the supply of nutrient solution from a tank at the inlet to BR\({}_{1}\) (inlet) through a peristaltic pump P\({}_{1}\), as well as for the automatic withdrawal of liquid (outlet) and transfer to BR\({}_{2}\) by pump P\({}_{2}\). The time period between two feeds can be controlled from the interface by setting the monitor to see how many minutes the unit time period should be. It is also possible to set the operating times of both pumps from the monitor. These capabilities provide an interactive mode of operation between the software and the user.  
A software sensor for the specific growth rate of H\({}_{2}\)-producing microorganisms and biomass in BR\({}_{1}\) was implemented, based on the following equations [23]:  
\[\left\{\begin{array}{l}\hat{\mathbf{z}}=-\mathrm{Dz}+\mathrm{Q_{H_{2}}}\\ \hat{\mu}=\frac{\mathrm{Q_{H_{2}}}}{\mathrm{z}}\\ \hat{\mathbf{X}}=\frac{\mathrm{Z}}{\mathrm{Y_{H_{2}}}}\end{array}\right.\]  
where D is the dilution rate in BR\({}_{1}\), \(\mathrm{Q_{H_{2}}}\) is the current measurement of H\({}_{2}\) yield in biogas, \(\hat{\mu}\) is the estimate of the specific growth rate of H\({}_{2}\)-producing microorganisms, \(\hat{\mathbf{X}}\) is the estimate of biomass in BR\({}_{1}\), Y\({}_{\mathrm{H_{2}}}\) is the yield coefficient determined by mathematical modeling of the process, and z is an auxiliary variable. The estimates of the two variables are visualized on the monitor.  
Figure 4: Monitor showing the main measured and calculated values of processes in BR\({}_{1}\).  
The system is able to control the pH of the bioreactor in the optimal range between 5.1 and 5.4 by supplying base and acid, respectively, below and above these limits by means of two peristaltic pumps (see Figure 3).