Introduction

Composting is a well known process for the disposal of solid organic waste. Moreover, the process yields organic fertiliser. In the natural run of the process, it consists of three main phases: mesophilic, thermophilic, and cooling down, or maturing. The thermophilic phase of the process runs at considerably high temperatures (45–80 °C); this results in the emission of carbon dioxide. Extending this phase of the composting process may result in shortening the entire process and reducing the amount of methane produced by it. The best temperature for the composting process is between 52 and 60 °C for the second (thermophilic) phase [20]. The higher temperatures (70–80 °C) can hygienize the compost, but waste of agricultural origin does not need hygienization. Therefore, the excess heat can be taken away and used in another place. On the first and third phase, only small amounts of heat and environmentally hazardous methane and ammonia are emitted [9]. Extending the thermophilic phase may result in a shortening of the entire process and a reduction in the amount of methane produced by it. This study was mainly devoted to developing an effective way of aeration of the bed being composted [1, 7, 8] or different additions in the bioreactors [16, 26]. Another trend in research aimed at reducing hazardous emissions is to reduce ammonia emissions by using bio filters [19].

The process control methods currently in use are usually based on adjusting the amount of air supplied to a compost heap by controlling either the temperature inside the bed or the oxygen content of the air which leaves the heap [13, 27].

The concept of capturing heat from a compost heap and using it effectively elsewhere, e.g., to supply heat in greenhouses, has been explored in the past [15, 23, 25]. In preliminary studies, the lettuce collection was accelerated by 12 days [23]. One major problem during the study was the precision in controlling the processes of heat removal and aeration in the bed. Too much heat removed from a heap may result in a temperature drop inside it, which, in effect, can slow down (or even stop) the thermophilic phase of composting. On the other hand, overheating a compost heap of biological material dramatically reduces the population of thermophilic microorganisms and slows down, or even stops, the process [5]. On the other side, too-intensive aeration results in dessication of the composting material and the simultaneous loss of heat; and too little aeration slows down the composting process.

As literature surveys show, systems based on fuzzy logic have proven effective in controlling complex non-linear processes [2, 18, 22]. Examples of using the fuzzy-logic-based control of various processes can be found in such diverse areas as controlling wind power plants [6, 11, 14] and controlling hydraulic systems of forging machines [17]. Methods of artificial intelligence and fuzzy logic are also applied in processes used in environmental protection [3, 4] or composting [29]. Another application of fuzzy logic can be found at work [10] in the demonstration of a theoretical fuzzy model of the composting process with simultaneous aeration.

Control the process of composting through a fuzzy logic system, i.e., aeration and heat removal from the compost heap, was analysed in order to achieve and maintain the optimum parameters of the thermophilic phase of the composting process; on the basis of citation [20], we have taken 55 °C as the temperature to remove the most heat possible without lowering the temperature inside the bed under 55 and while maintaing the appropriate aeration; and thereby shortening the composting process.

Methods

The principles of construction of the research stand

The research stand enables measurement and archiving of the following physical quantities:

  • Temperature:

    • At several points inside the bed;

    • Ambient;

    • Of air flowing into the bed;

    • Of air flowing out of the bed;

    • Water at the inlet and outlet of the cooling system

  • Air humidity at the inlet and outlet of the bed;

  • Air flow at the inlet and outlet of the bed;

  • Water flow in the cooling system;

  • Time;

  • Charge weight measurement;

  • Measurement of the post-process compost mass;

  • Run-off mass;

  • Electric current power in the system of the air heating pumped into the bed;

  • Concentration of gases in the air leaving the compost heap: carbon dioxide and ammonia.

Measurements and archiving of individual quantities are performed with sensors:

  • Temperature––DALLAS 18B201 sensors, accuracy class: 0.25 °C;

  • Air flow––air thermal flow meters MCF008 manufactured by Yamatake, accuracy ±3 % FS, flow rate range from 0 to 200 l min−1, analogue output 4–20 mA;

  • Water flow in the cooling system––flow meter KAMSTRUP multi 3.5 type MULTICAL 401, measurement range 0.0035–3.5 m3 h−1;

  • Measurement of the power of the electric heater of air at the bioreactor inlet––digital meter manufactured by Lumel, type N30P, which enables measurement of basic electric quantities, including power and active energy, as well as time, analogue output––programmable 0–10 V, active energy––measurement from 0 to 9999999.9 kWh within an accuracy of ± 5 %, time measurement within an accuracy of up to 1 s per 24 h;

  • Humidity measurement––humidity meter, manufactured by AZ Instruments, model AZ 8829R, measurement range 0–100 % RH, recording frequency from 1 s to 2 h;

  • mass measurement––digital scales;

According to the concept presented in articles [24, 25] the stand consists of a 0.5 m³ insulated bioreactor. In each test series, the weight of composted material was 50 kg. Temperature sensors are deployed evenly throughout the bioreactor space. The aeration system employs a fan powered by an asynchronous engine, with rotation speed adjusted with an inverter (in order to ensure smooth adjustment of the bed aeration from 0 to 10 dm3 min−1). An electric heater with the option to measure the amount of energy consumed was used to stabilise the temperature of the air used to aerate the bed. Humidity and air flow rate sensors were fixed at the bioreactor inlet and outlet. The heat removal systemconsists of copper coil pipe, a retrieved heat storage reservoir, sensors for measuring the cooling system inlet and outlet water temperature, a flow rate meter valve, and a pump with smooth rotation adjustment (with an inverter), which makes the water flow adjustable from 0 to 4 dm3 min−1.

Additionally, for tests series 1 and 4, concentrations of CO were measured.2 and NH3 in the outlet air over 24 h.

Fuzzy controlling

The mathematical foundations of fuzzy controlling can be found in the literature [12, 21, 28]. A definition of a fuzzy set is an extension of a crisp (conventional) set and allows for element membership in a set to assume not only extreme values of 0 and 1, but also intermediate values. Figure 1 shows examples of conventional and fuzzy sets.

Fig. 1
figure 1

Examples of (a) crisp set and (b) fuzzy set (with the membership function)

The concept of a fuzzy function (fuzzy set) also includes the concept of linguistic variables. Its notation includes words, e.g., temperature, age. A linguistic variable adopts values from previously established sets; for example, the “temperature” variable assumes values from the following set: (too low; good; too high). The process of fuzzy control can be presented according to the diagram in Fig. 2. An example of a fuzzy set for a linguistic variable “temperature”, according to the concept of fuzzy control of the composting process, is shown in Fig. 3a. It also shows the fuzzy state of the input value of “temperature = 51 °C”. It is apparent that with a degree of 0.4, the value is a member of the “too low” set, and with a degree of 0.5, it fales in the “good” set.

Fig. 2
figure 2

A diagram of a fuzzy process control system

Fig. 3
figure 3

a A fuzzy set for the linguistic variable “temperature” (X); b a fuzzy set for the variables “air blow rate” and similarly “heat removal rate” (Y); c a set changed for the variable air blow rate and heat removal rate

It is not necessary to know a technological process to be able to apply fuzzy sets to control it––but it is necessary to formulate a set of rules of procedure in the form of "if, then" sentences where the antecedent of the rule contains a set of conditions, and the consequent containsthe conclusion. Rules can be presented in the form of a relationship matrix. The relationships are in the rules database. The response of fuzzy control to the input signal is calculated in the defuzzification block. The concept of fuzzy control of the composting process uses the centre of gravity method:

$$ y = \frac{{\sum\nolimits_{k = 1}^{n} {\mu_{\text{B}} } (y_{k} )y_{k} }}{{\sum\nolimits_{k = 1}^{n} {\mu_{\text{B}} } (y_{k} )}} $$
(1)

Fuzzy control of the composting process

The basic assumptions of the control system operation are as follows. Below is a list of the input-dependent variables selected:

  • Temperature inside the bioreactor (T)––enables the assessment of heat removal process;

Input-dependent variables were selected:

  • Aeration rate (V N )––too little aeration slows down the process, causing a drop in temperature inside the heap; too much aeration results in drying the composting material and the simultaneous loss of heat to air, which lowers the temperature inside the heap

  • Heat removal rate (V Q )––too-strong heat removal causes a drop in temperature inside the heap below the optimum temperature; heat removed at too low a level reduces the efficiency of the process.

The output variables include:

  • Aeration rate (V N );

  • Heat removal rate (V Q ).

In the research stand used for the study, the pump and fan regulator system assumes values from zero to maximum––represented by voltage (values from 0 to 10 V––PLC controller analogue output––inverter analogue input––as a regulator of the engine rotational speed in the aeration and heat removal system), and the temperature measurement was conducted in six layers (evenly distributed at the bioreactor altitude), with four sensors in each layer. The mean value from all the temperature sensors was adopted as the variable for the control system.

For the system control concept, Fig. 3a shows a fuzzy set for the input variable “temperature” (as the figure shows, the “optimum” temperature was adopted as 55 °C) and for input variables “air blow rate regulation” and “heat removal” (the same distribution determined by the voltage level on the PLC analogue output was adopted, although it corresponds to different real values) on the Fig. 3b. Linguistic data for the process temperature include [too low, good (optimum), too high], and for the regulation (of air blow and heat removal)––(low, medium, high).

In the concept under discussion, the set of rules will contain 54 relationships havingthree input variables; each variable may be a member of three fuzzy sets, which, for a two-output signal, gives, e.g. in this case, 54).

Examples of rules:

1: IF T = to low AND v N = low AND v Q = low THEN v N = high AND v Q = low

2: IF T = to high AND v N = low AND v Q = low THEN v N = low AND v Q = high

After the rules base was created for several cases of input data, the output data were calculated with the use of the centre of gravity method; (1) example results are shown in Table 1 and displayed the expected variable distribution, as in Fig. 3a, b.

Table 1 Example results of calculations for the fuzzy control system

The controlling program based on the above assumptions was subsequently implemented in the PLC.

The distribution of fuzzy sets was changed in order to regulate the control system operation. For example, Fig. 3c shows the changed distribution for the variable air blow rates.

Preparation of experiment

Freshly mown grass with 50 % (w/w) of cabbage was used as the compost material. The material was ground and mixed in order to make the mixture uniform. Temperature sensors were deployed in the material upon being loaded into the bioreactor; the bed temperature was calculated as the mean value of all the sensors inside it. The results of temperature measurements were recorded automatically every 60 s and the mean value was calculated for each measurement hour.

The mean value was subsequently sent to the control system. The water temperature in the cooler tank was also measured; when the value of 20 °C was exceeded, the water in the tank was replaced with tap water with a temperature of about 10 °C.

Results and discussion

The results are shown in the diagrams: Fig. 4a temperature distribution inside the bed, aeration intensity in Fig. 4b, water flow in the cooling system during the composting process in Fig. 4c, the removed heat for series 3–6 in Fig. 4d, and for series 1 and 4 concentrations of NH3 in Fig. 4e and CO2 in Fig. 4f.

Fig. 4
figure 4

a Temperature distribution inside the bed; b the bed aeration intensity; c cooling water flow; d removal heat; e concentration of NH3 and CO2––f in the time of composting

Series 1 and 2 were control series with no fuzzy control. Series 1 had no heat removal or aeration and the thermophilic phase lasted 705 h; series 2 had no heat removal and aeration of 5 l/min−1 was constant, and the thermophilic phase lasted 617 h. The other experiments were conducted with different distributions of the input and output values; the values are listed in Table 2, notation as in Fig. 3a, b. Two experiments were carried out for each case.

Table 2 The fuzzy function membership for the input and output variables, notation as in Fig. 3a, b

Control algorithm

Analysis of the results in Table 1 shows that the control system functions correctly with respect to calculations. At low temperatures (items 3–4 and 6–8) it increases the air blow rate (which according to reports, increases the temperature) and reduces the heat removal rate. At higher temperatures (items 1 and 2) it increases the heat removal rate while at the same time decreasing the air blow rate. At a bed temperature close to the optimum value (55 °C), the values of v N and v Q do not change significantly (item 5).

Control system

An analysis of the results from diagrams (Fig. 4a–c) and Table 2 indicates the following:

  • The temperature inside the bed for cases 3–6 fluctuated around the value set as the optimum, and caused changes in variables distribution ithat were accompanied by a change in the characteristics of the regulation system. This proves the effectiveness of the control and regulation system.

  • In the next step, the energy balance will be made for the entire process, which will enable optimisation of the control system in accordance with the adopted criteria (the choice of the most beneficial variable distribution and change, if any, of the rules in the rules base).

Conclusions

The designed system is consistent with the results obtained from the simulation model.

As it is shown in figure (chart) 4, the control system operates according to the initial assumptions that the temperature in the compost bed did not exceed 57 °C for the 3rd and 5th series while in the 4th series,, the most advantageous temperature did not exceed 56 °C, and for the 6th series was too low.

In series 1 and 2 the thermophilic phase lasted 705 and 617 h, respectively, and for all other series (3–6) was shorter than 288 h.

The NH3 emission was also lower for series 4 (with heat removal).

The CO2 emission was on the same level in series 1 and 4.

During the process of composting, heat removed fduring series 3 was 88.9 MJ,, for series 4, 88.8 MJ, for series 5, 86.8 MJ. For series 6, it was 105.6, because while the composted material was the same in each series, the distribution of linguistic variables was better for series 6.

For the final process optimization, there should be additional studies of the impact of the distribution of linguistic variables on the actual results of composting for more cases.