Analysis of Voltage Distortions in the Power Grid Arising from Agricultural Biogas Plant Operation

: Agricultural biogas plant operations are energy sources that ﬁ t well with rural land use. The continuous increase in ca tt le and pigs creates the need to manage animal waste, especially slurry. Using it for energy production in biogas plants o ﬀ ers the possibility of obtaining electricity, heat, and highly e ﬃ cient manure. The thermal energy generated in an agricultural biogas plant is used to heat the substrate in the fermentation process and can also be used to heat buildings, dry fodder, or wood. Electricity can be used to cover the farm’s needs and sold to an energy company. However, the energy generated in the biogas plant must be of the right quality. One of the main factors describing the quality of electricity is the voltage distortion from the sinusoidal waveform. This paper presents the results of a study of the impact of biogas plant operation on the course of voltage and current in the grid. The theoretical analysis of the voltage distortion mechanism at the point of connection of an agricultural biogas plant was based on a simpli ﬁ ed power system model consisting of a voltage source and the equivalent impedance of the power system. According to the theoretical analyses, agricultural biogas plant operation should reduce the voltage distortion factor. In order to con ﬁ rm this statement, ﬁ eld tests were carried out at three agricultural biogas plants, based on which an analysis was made of the impact of the power generated in the biogas plants on the value of voltage distortion occurring at the point of their connection. However, the ﬁ eld tests did not con ﬁ rm the conclusion of the theoretical analysis. Only in one case (where the biogas plant was connected near a substation and there was the highest short-circuit power) could it be seen that an increase in generation a ﬀ ected the voltage distortion factor. In the other two cases, generation did not signi ﬁ cantly a ﬀ ect the shape of the voltage waveform. However, in each of the biogas plants studied, as the generation power increased, the current distortion factor decreased, suggesting that agricultural biogas plants should operate as close to the rated power as possible.


Introduction
Interest in anaerobic digestion applications has increased significantly over the past few years, especially concerning the use of manure and agricultural industry waste as a primary source of biomass for biogas production [1][2][3][4][5]. Nevertheless, most substrate remains from dedicated crops [6,7]. This is due to energy crops' role in achieving higher methane yields and stabilising biogas production [8][9][10]. The primary purpose of agricultural biogas plants is, in most cases, to produce electricity for profit (excluding prosumer biogas plants, which produce electricity for the needs of a farm) [11,12]. Therefore, it is necessary to choose an appropriate location to connect the biogas plant to the grid, which will guarantee both the possibility of transmitting a given amount of energy and ensuring that the quality parameters of the generated electricity are met [5,13]. The development of renewable energy sources connected to electricity grids, in addition to being environmentally and socially friendly, is often associated with problems concerning the coordination of line protection, deformation of the supply current and voltage, frequency drop, and grid stability and reliability [14][15][16][17][18].
An agricultural biogas plant is a stable energy source, i.e., the power generated over time is approximately constant and, in most cases, does not depend directly on the variability of weather factors such as sunshine or wind [19]. The power of a biogas plant depends mainly on the amount of biogas produced (and this on the quantity and quality of the substrate used to produce it) and on the possibility of managing the digestate (which depends-on wet digestate-mainly on the seasons) [20].
In addition to electricity, agricultural biogas plants can cogenerate heat [21]. Due to the lack of technical options for connecting nearby heat consumers to the source, heat is most often used only for the biogas plant's own needs (usually to ensure an appropriate temperature in the digesters) [22,23]. In addition, heat from the biogas plant can power technological processes carried out in parallel with the electricity generation activity, e.g., drying of digestate, wood, or other fuel materials. Most often, this is a so-called side activity that does not directly affect the amount of electricity generated at the biogas plant. Heat is extracted from the flue gases generated during the biogas combustion in most operational agricultural biogas plants.
Another type of agricultural biogas plant is one where the main product of the processes taking place there is fuel in the form of biogas. After appropriate purification, the biogas produced can be injected into the gas grid, used as fuel in vehicles, or used in other technological processes [24]. In such biogas plants, electricity is often not generated, or its production is a side activity (used to power the plant's equipment). Nevertheless, such plants could find widespread use where, for technological reasons, it is impossible to send all the electricity that can be generated [25].
When selecting the location of a biogas plant, the availability of the individual substrates used for biogas production must be considered, as well as the possibility of obtaining technical connection conditions from the power company [26]. In order to obtain connection conditions, it must be confirmed that the electricity generated in the gas generator can be transmitted through the various components of the electricity grid without causing undesirable phenomena in the grid, such as overvoltage or voltage distortion [27]. Generally, biogas power plants use internal combustion engine generators with high electrical efficiency (around 50%) [28,29]. One of the main issues analysed with renewable energy sources is the quality of the electricity they produce. This problem can be considered in two ways: the quality of the energy produced in the biogas plant and the quality of the energy consumed by the equipment installed in the entire power plant. The generator primarily affects the voltage parameters in the electricity grid, while the appliances installed in the biogas plant affect the current's time course. In practice, due to the significant difference in price between the energy produced and the energy consumed, an agricultural biogas plant has two power connections-one through which the energy produced is fed into the grid and another which supplies the power plant equipment. Such a solution does not have a technical justification (it is much more complicated and therefore a failure) but is purely economically driven (this connection method is more profitable). Meeting the quality parameters is intended to ensure the stable operation of the energy source in question, and the energy security of the consumers connected to the same electricity grid as the biogas plant.
One of the basic parameters describing the quality of electricity is the voltage distortion from a sinusoidal waveform, which is described by the content of the individual harmonics and the THD (total harmonic distortion factor). The individual voltage harmonics are a multiple of the total fundamental frequency of the supply voltage. The total harmonic distortion factor voltage (THDU) defines the percentage ratio of the rms values of the higher harmonics to the rms value ("root mean square," the square root of the mean square of instantaneous values of the voltage signal) of the first harmonic (fundamental frequency) [30]: where: Uh-rms value of the voltage for the h-th harmonic (V); U1-rms value of the voltage for the first harmonic (fundamental frequency) (V); h-harmonic order. Voltage distortion is often the result of equipment (consumer and generation) with non-linear current-voltage characteristics. One of the most numerous groups of this type of equipment currently contains power electronics. The voltage distortion from the sinusoidal waveform is mainly the result of higher harmonic currents flowing through the networks.
According to the regulations currently in force, the individual harmonics must not exceed the values given in Table 1, and the value of the total voltage distortion factor should not be more excellent than 8% [31]. In photovoltaic installations, the control method given by Wang et al. [33], based on a single-phase dq0 transform, dividing the input current into the fundamental and other parts, and reducing the total harmonic distortion on critical loads by replacing voltage control with DC control, can be used to reduce the harmonic distortion of the grid.


Cause additional power losses in them (in lines, these will be additional power losses due to the increase in the rms value of the current and the resistance of the conductors);  Cause a reduction in the capacity of electricity networks;  Cause measuring instruments (i.e., analogue meters, inductive energy meters) to malfunction and thus often cause protection systems to malfunction.
These typical power quality problems are attracting the attention of researchers worldwide [38][39][40]. System stability problems caused by harmonics can no longer be ignored [41][42][43]. When a distributed energy source has a small share of power compared to conventional sources, the impact of interference from that source can be minimal. However, the risk of interference increases significantly if the share is large, which is most often the case in rural networks. Various technical solutions for transient monitoring have been proposed in articles [44,45]. Muljadi [46], in his work, addressed the impact of reactive power compensation of wind farms on the parameters of the electricity generated at the farm. However, all the works mentioned above deal with theoretical analyses, and field tests did not support their results. Only Shalukho [47] presented the results of a study conducted on a laboratory model of a wind power plant. He showed that a mo-delta power plant negatively affects the supply voltage distortion. In the currently available literature, there is a lack of detailed studies on the impact of generation in agricultural biogas plants on voltage distortion in the power grid. Therefore, the authors decided to fill this gap by conducting a mathematical analysis and performing field tests on three biogas plants connected to the medium-voltage grid.

Materials and Methods
The study aimed to verify the influence of agricultural biogas plants on the deformation of voltage and current in the medium-voltage power grid. The scope of the work included a theoretical analysis of the issue, the conclusions of which were then verified in field studies. Agricultural biogas plants with a gas turbine generator with the parameters shown in Table 2 were adopted for the mathematical analyses and field tests. Each agricultural biogas plant studied produced an average of around 3900 MWh of electricity per year, with energy consumption for own use averaging around 450 MWh per year. The volumes of the digesters in the studied biogas plants were identical and amounted to 4300 m 3 . The primary substrates used in the biogas plants studied were maize silage (approximately 46%), cattle slurry (approximately 27%), and cattle manure (approximately 19%). Other substrates (food processing waste, pig slurry, manure, chicken manure) accounted for about 8%. The analysis of the voltage distortion mechanism at the point of connection of the agricultural biogas plant was based on a simplified power system model consisting of the voltage source and the equivalent impedance of the power system. Generation or offtake is represented by linear and non-linear elements that consume or input electricity. In steady state, the system can be considered separately for each harmonic of order h by introducing the source voltage U0(h), the current IL(h), and the power system impedance ZS(h). The value of the harmonic voltage of order h at the point of connection Upcc(h) can be described by the equation [48]: The voltage at the point of connection contains the sum of the background distortion U0 (h) (caused by the non-linear loads present in the power system) and the distortion caused by the analysed load or generator ℎ • ℎ . Depending on the phase shift of a given current harmonic IL(h), the voltage drop across the system impedance can have a positive or negative sign, as shown in Figure 1.   In this case, the connection of a load or generator leads to an increase in voltage distortion at the point of connection (PCC). Figure 1b illustrates the situation where |Upcc(h)| > |U0(h)| and the connection of a load or generator leads to a reduction of the voltage distortion at the point of connection (PCC).
The THDUpcc factor at the point of connection, taking into account relation (2), is described by the equation: Power grid companies do not determine the value of the system impedance ZS(h). Therefore, it is more common, when describing the system parameters, to use the shortcircuit power , which can be related to the system impedance (Zs) according to the following relationship: in which Un is the nominal voltage, and wh is the coefficient of impedance gain-along with the harmonic order (h), described by the equation [49]: Given Equations (4) and (5), relation (3) takes the form: When the generator is connected to the electricity grid, the value of the denominator of relation (6) will increase. At the same time, in modern cogenerators used in agricultural biogas plants there should be a very low distortion of the generated current, which will cause a slight increase in the value of the denominator of relation (6). Therefore, a reduction in the value of the voltage distortion factor at the point of connection (THDUpcc), when the power plant is in operation, should be expected. Furthermore, the value THDUpcc will be influenced by the short-circuit power , which should also increase due to the connection of the source.
In order to confirm the above considerations, field tests were carried out at three agricultural biogas plants where generators with the parameters described in Table 1 were installed. A portable power quality analyser from SONEL, type PQM-701, certified by the Testing and Calibration Laboratory in Świdnica, was used for the recording. With the analyser, the network parameters were recorded in accordance with class A of the IEC 61000-4-30 standard [50]. It is a programmable device with which single-phase or three-phase electricity network parameters can be measured, calculated, and stored in memory. In each case, the analyser was connected to the system at the location of the electricity meter. Based on the tests carried out, an analysis was made of the influence of the power generated at the agricultural biogas plant on the value of the voltage distortion occurring at its point of connection. It is a practical alternative to feasible computer simulations.

Studies on the Quality of Electricity Generated at Biogas Plant No. 1
A summary of the analysis of the three-phase active power P recorded at Biogas Plant No. 1 is shown in Figure 2. As can be seen from the curve shown there, the biogas plant never reached its rated power. This is mainly due to the need to power the biogas power plant equipment. Also noteworthy are the recorded periods without electricity production resulting from grid failures occurring at the time.
A summary of the results of the statistical analysis of the voltage THD values occurring on the 15 kV buses in the individual phases is shown in Figure 3 and Table 3. The recorded values of the total voltage distortion coefficient are close to each other in the individual phases and are more than four times lower than the nationally required values.   A summary of the results of the statistical analysis of the content of the individual harmonics of the voltage on the 15 kV buses is shown in Figure 4. The highest value was recorded for harmonics 5 and 7. The third and eleventh-order harmonics are also above 0.3%. The even harmonics take on negligibly small values. The Kolmogorov-Smirnov test showed that the population distributions studied could be described by a normal distribution ( Figure 5), with a much larger scatter of current distortion factor values recorded than the voltage distortion factor. In order to determine whether these variations are the result of changes in the current generated in the generator, Figure 6 shows scatter plots of the voltage and current distortion coefficient values recorded for Biogas Plant No. 1 in relation to the current flowing in phase L1 (the current in the different phases was symmetrical, so taking the values recorded in phase one does not introduce additional error into the analyses). It can be seen from the graphs in Figure 6 that both the voltage and current distortion coefficient decrease in value as the current (power) generated at the biogas plant increases.

Studies on the Quality of Electricity Generated at Biogas Plant No. 2
A summary of the analysis of the levels of three-phase active power P generated by Biogas Plant No. 2 is shown in Figure 7. It is essential to note the large (nearly 50 kW) variation in the power sent to the electricity system by the biogas plant, which results from the stirrers of the substrate located in the digester switching on. Biogas Plant No. 2 also registered a significantly higher power consumption during the turbogenerator shutdown. The reason for this is the specific operation of this biogas plant, namely the use of heat from the biogas plant to dry cherry stones. When the amount of heat extracted from the turbine is insufficient, electric heaters are switched on to achieve the desired temperature.  Figure 8 and Table 4. The recorded maximum value of the total voltage distortion coefficient is almost twice as low as the value required by national regulations. However, these are instantaneous values, and the average value deviates slightly from the 95% quantile value. From the correlation of the waveforms in Figures 7 and 8, it can be seen that increases in the voltage distortion factor occur during periods of no generation at the agricultural biogas plant. Comparing the THDU values in the different phases, it is clear that the lowest value occurs in phase L2 in most cases. This situation may be due to interference introduced into the system by single-phase loads installed at the biogas plant under study and at other customers connected to the exact line string as the biogas plant.
A summary of the results of the statistical analysis of the content of the individual voltage harmonics recorded at the connection point of Biogas Plant No. 2 (at the 15 kV buses) is shown in Figure 9. As in the case of Biogas Plant No. 1, the highest value was recorded for harmonics five and seven. The eleventh-order harmonic is also above 0.3%, and the third-order harmonic is close to 3%. The even harmonics also take negligibly small values in this case.
The Kolmogorov-Smirnov test showed that the population distributions studied could be described by a normal distribution (Figure 10), and here too, there was a greater scatter of current distortion factor values compared to the voltage distortion factor. In order to determine whether these changes are the result of changes in the current generated in the generator, Figure 11      The scatter plot shows an extreme dependence of the current distortion factor as a function of the current injected into the grid-the higher the current, the lower the THD valueI. The generator should operate as close as possible to the rated power. The distribution of the voltage distortion factor shown in Figure 11 differs from that recorded for Biogas Plant No. 1. According to the statistical analysis, as the load current increases, the THD value increasesU. However, this relationship is determined with a very low correlation coefficient (0.22), making it tempting to conclude that, in this case, the operation of the agricultural biogas plant does not significantly affect the change in voltage distortion factor.

Studies on the Quality of Electricity Generated at Biogas Plant No. 3
A summary of the analysis of the levels of three-phase active power P generated by Biogas Plant No. 3 is shown in Figure 12. As in Biogas Plant No. 2, the operation of the mixers of the digestate in the fermenter is noticeable. The high power variability at the beginning of the recording is due to the failure of the supply network (there was significant wet snowfall at the time, which caused ground faults-the line supplying the biogas plant also runs through woodland). The recorded power limitations resulted from limited space in the digestate tank. Due to the existing snow cover, the possibilities to export the digestate outside the biogas plant were significantly limited. A summary of the results of the statistical analysis of the voltage distortion factor values recorded at the connection point of the biogas plant-at the 15 kV buses in individual phases-is presented in Figure 13 and Table 5. The value of the total voltage distortion factor during the recording period oscillated around 1.5% and did not exceed (with two exceptions) 2.5%. These values are about four times smaller than the values required by the regulations but are the largest of all three agricultural biogas plants studied.
A summary of the results of the statistical analysis of the content of the individual voltage harmonics recorded on the 15 kV buses of the transformer substation supplying the agricultural Biogas Plant No. 3 is presented in Figure 14. The fifth and seventh-order harmonics account for the largest share (more than 1%) of the voltage generated at Biogas Plant No. 3. The remaining harmonics (in contrast to previous measurements) do not exceed 0.3%. Even harmonics are negligibly small, as their value does not exceed 0.03%.  The Kolmogorov-Smirnov test showed that a normal distribution could describe the population distributions studied (Figure 15). In this case, however, the scatter in the values of the current distortion factor was not as large as in the other power plants. In order to determine whether these variations are the result of changes in the current generated in the generator, Figure 16 shows the scatter plots of the voltage and current distortion factor values recorded for Biogas Plant No. 1 in relation to the current flowing in phase L1 (analogous to the other biogas plants).  The scatter plot shows-as in the other biogas plants under study-an increase in the value of the current distortion factor as a function of the current fed into the grid-the higher the current, the lower the THD valueI. However, this relationship is not as strong as in the case of Biogas Plant No. 2. The distribution of the voltage distortion factor shown in Figure 15 is similar to that recorded for Biogas Plant No. 2. According to the statistical analysis, a change in the load current does not cause a change in the THD valueU. This relationship is determined with a very high correlation coefficient (0.95), which confirms that in the case of Biogas Plant No. 3, the operation of the gas turbine generator does not affect the change in the voltage distortion coefficient. Table 6 summarises the measured values of the voltage distortion coefficient THDU for all the agricultural biogas plants studied. As can be seen, these values vary from biogas plant to biogas plant (at Biogas Plant No. 1, they are the lowest, and at Biogas Plant No. 3, they are the highest). However, as can be seen from the statistical analyses presented above, the increase in THDU values is not due to the operation of the agricultural biogas plants. Table 6. Summary of the statistical analysis results of the coefficients of the higher harmonic content of voltage-THDU on 15 kV buses for the studied biogas plants. Therefore, in the case of agricultural biogas plants, the conclusions Shalukho [47] described, that renewable energy sources negatively affect the distortion of the supply voltage waveform, were not confirmed. In the biogas plants analysed, power generation either did not affect the voltage distortion coefficient THDU or caused a reduction in its value. In the case of the current distortion coefficient THDI, increased power generated at the biogas plant reduced its value.

Number of the
The continuous changes in the value of the power generated in biogas plants recorded during the study can lead, as shown in [44,45], to the occurrence of transients in electrical installations and networks. This topic requires additional research.

Conclusions
Agricultural biogas plants are increasingly common sources of electricity and heat. Anaerobic digestion produces biogas which, after purification, can be used, for example, as fuel for cars. Despite the many technically feasible solutions, agricultural biogas plants are, in most cases, sources of electricity (the heat generated is a by-product and is rarely used commercially). Therefore, biogas plants must not deteriorate the quality of electricity transmitted through the electricity grid.
One of the basic parameters describing the quality of electricity is the voltage distortion factor from a sinusoidal waveform. A mathematical analysis shows that agricultural biogas plants should have a limiting effect on values THDU. However, field tests at three agricultural biogas plants did not confirm this relationship. Only in one case (where the biogas plant was connected near the high-voltage substation and the highest short-circuit power was present) could it be observed that an increase in generation influenced the reduction of the voltage distortion factor value (by about 0.3%). In the other two cases, generation did not significantly affect the shape of the voltage waveform. The distortion waveforms of the current sent to the electricity grid were different. In each biogas plant studied, as the power generated increased, the current distortion coefficient THDI decreased (by an average of 3%), suggesting that agricultural biogas plants should operate close to the rated power.
Also noteworthy are two regularities noted during the study: the biogas plant never reaches its rated output, and the power generated is not constant over time (variations in output caused, among other things, by the operation of the digestion mixers, are noticeable).
In summary, agricultural biogas plants do not significantly affect the voltage waveform distortion, while improving the shape of the current injected into the grid. Furthermore, the authors believe that further studies are necessary to verify the impact of agricultural biogas plants on other parameters describing the quality of electricity.