# Analysis of Residual Current Flows in Inverter Based Energy Systems Using Machine Learning Approaches

^{1}

^{2}

^{3}

^{4}

^{*}

^{†}

^{‡}

## Abstract

**:**

## 1. Introduction

#### 1.1. Background

#### 1.2. Motivation

#### 1.3. Contribution

#### 1.4. Related Works

## 2. Methodology

#### 2.1. Dataset

#### 2.2. Input Data Preparation

- Resampling: Due to the varying sampling period it is necessary to convert the data to a dataset with a constant sampling period;
- Removal of duplicates;
- Filling of missing values. Forward filling, followed by backward filling is used.

#### 2.3. Pattern Recognition

#### 2.4. State Estimation

#### 2.4.1. Variational Autoencoder

#### 2.4.2. Anomaly Detection

#### 2.5. Experimental Data Acquisition

#### 2.6. Scenario Description

#### 2.6.1. Scenario 1: Instantaneous Increase of the Capacitive Resistance

#### 2.6.2. Scenario 2a: Instantaneous Decrease of the Ohmic Resistance

#### 2.6.3. Scenario 2b: Gradually Decrease of the Ohmic Resistance

#### 2.6.4. Scenario 3: Increased Series Resistances and Broken Lines

#### 2.6.5. Scenario 5: DC Electric Arcs

## 3. Results and Discussion

#### 3.1. Fault Patterns

#### 3.1.1. Scenario 1: Instantaneous Increase of the Capacitive Resistance

#### 3.1.2. Scenario 2a: Instantaneous Decrease of the Ohmic Resistance

#### 3.1.3. Scenario 2b: Gradually Decrease of the Ohmic Resistance

#### 3.1.4. Scenario 3: Increased Series Resistances and Broken Lines

#### 3.1.5. Scenario 5: DC Electric Arcs

#### 3.1.6. Summary

#### 3.2. Fault Detection

#### 3.2.1. Training Phase

#### 3.2.2. Scenario 1: Instantaneous Increase of the Capacitive Resistance

#### 3.2.3. Scenario 2b: Gradually Decrease of the Ohmic Resistance

#### 3.2.4. Scenario 3: Increased Series Resistances and Broken Lines

## 4. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Acknowledgments

## Conflicts of Interest

## Abbreviations

MDPI | Multidisciplinary Digital Publishing Institute |

DOAJ | Directory of open access journals |

PV | Photovoltaic |

DC | Direct Current |

RMS | Root Mean Square |

DUT | Device Under Test |

MPP | Maximum Power Point |

PoE | Power-over-Ethernet |

RCM | Residual Current Monitor |

RCD | Residual Current Device |

## References

- DKE. DIN VDE 0100—200: Errichten von Niederspannungsanlagen; VDE Verlag: Berlin, Germany, 2006. [Google Scholar]
- Avizienis, A.; Laprie, J.C.; Randell, B. Fundamental Concepts of Dependability; Technical Report; Department of Computing Science Technical Report Series; 2001; Available online: https://eprints.ncl.ac.uk/file_store/production/55707/35D90208-2D34-4C19-BFB5-65E037791AE6.pdf (accessed on 22 July 2021).
- Stylianos, S.; Karolidis, D.; Voyiatzis, I.; Samarakou, M. Photovoltaic Faults: A comparative overview of detection and identification methods. In Proceedings of the 10th International Conference on Modern Circuits and Systems Technologies (MOCAST), Thessaloniki, Greece, 5–7 July 2021. [Google Scholar]
- Kumaradurai, A.; Coosemans, T.; Teekamaran, Y.; Messagie, M. Fault Detection in Photovoltaic Systems Using Machine Learning Algorithms: A Review. In Proceedings of the 8th International Conference on Orange Technology (ICOT), Daegu, Korea, 18–21 December 2020. [Google Scholar]
- Fazai, R.; Mansouri, M.; Abodayeh, K.; Trabelsi, M.; Nounou, H.; Nounou, M. Machine Learning-Based Statistical Hypothesis Testing for Fault Detection. In Proceedings of the 4th Conference on Control and Fault Tolerant Systems (SysTol), Casablanca, Morocco, 18–20 September 2019. [Google Scholar]
- Attouri, K.; Hajji, M.; Mansouri, M.; Harkat, M.; Kouadri, A.; Nounou, H.; Nounou, M. Fault detection in photovoltaic systems using machine learning technique. In Proceedings of the 17th International Multi-Conference on Systems, Signals and Devices (SSD), Monastir, Tunisia, 20–23 July 2020. [Google Scholar]
- Hajji, M.; Harkat, M.; Kouadri, A.; Abodayeh, K.; Mansouri, M.; Nounou, H.; Nounou, M. Multivariate feature extraction based supervised machine learning for fault detection and diagnosis in photovoltaic systems. Eur. J. Control
**2021**, 59, 313–321. [Google Scholar] [CrossRef] - Bengio, Y.; Courville, A.; Vincent, P. Representation Learning: A Review and New Perspectives. IEEE Trans. Pattern Anal. Mach. Intell.
**2013**, 35, 1798–1828. [Google Scholar] [CrossRef] [PubMed] - Ridgeway, K. A Survey of Inductive Biases for Factorial Representation-Learning. arXiv
**2016**, arXiv:cs.LG/1612.05299. [Google Scholar] - Tipping, M.E.; Bishop, C.M. Probabilistic principal component analysis. J. R. Stat. Soc. Ser. (Stat. Methodol.)
**1999**, 61, 611–622. [Google Scholar] [CrossRef] - Rumelhart, D.E.; Hinton, G.E.; Williams, R.J. Learning Internal Representations by Error Propagation. In Parallel Distributed Processing: Explorations in the Microstructure of Cognition, Volume 1: Foundations; MIT Press: Cambridge, MA, USA, 1986; pp. 318–362. [Google Scholar]
- Kingma, D.P.; Welling, M. Auto-Encoding Variational Bayes. arXiv
**2014**, arXiv:stat.ML/1312.6114. [Google Scholar] - Higgins, I.; Matthey, L.; Pal, A.; Burgess, C.P.; Glorot, X.; Botvinick, M.; Mohamed, S.; Lerchner, A. beta-VAE: Learning Basic Visual Concepts with a Constrained Variational Framework. In Proceedings of the ICLR 2017 Conference Submission, International Conference on Learning Representations, Toulon, France, 24–26 April 2017. [Google Scholar]
- Burgess, C.P.; Higgins, I.; Pal, A.; Matthey, L.; Watters, N.; Desjardins, G.; Lerchner, A. Understanding disentangling in β-VAE. arXiv
**2018**, arXiv:stat.ML/1804.03599. [Google Scholar] - Datenblatt TC.ACS.30.528.4WR.S.LC. Available online: https://www.regatron.com/assets/resources/Documents/Technical-Datasheets/TC.ACS/DS_TC.ACS.30.528.4WR.S.LC_EN_210518.pdf (accessed on 24 August 2021).
- Datenblatt EA-PSI 91000-30 3U 19″ 3HE. Available online: https://elektroautomatik.com/shop/media/pdf/ef/a8/ee/datasheet_psi9000_3u.pdff (accessed on 24 August 2021).
- Datenblatt Differenzstrommonitore DCTR B-X Hz 035-PoE. Available online: https://www.doepke.de/uploads/tx_doepkeproducts/datenblatt/doepke_09344937_dbl_de.pdf (accessed on 24 August 2021).

**Figure 1.**Simplified models of the data processing pipelines: (

**a**): Principle of the state estimation training pipeline. (

**b**): Principle of the state estimation prediction pipeline.

**Figure 2.**Principle of a Power-Hardware-in-the-Loop test setup used to physically emulate faults in a grid-connected PV system and to analyse the effect of those faults on the residual current.

**Figure 3.**Physical emulation of faults in an inverter based energy system: Instantaneous increase of the capacitive resistance between line and ground.

**Figure 4.**Physical emulation of failures in an inverter based energy system: Instantaneous decrease of the ohmic resistance between line and ground.

**Figure 5.**Physical emulation of faults in an inverter based energy system: Slow decrease of the ohmic resistance between line and ground.

**Figure 6.**Physical emulation of faults in an inverter based energy system: (

**a**): Instantaneous disconnection of the neutral line N. (

**b**): Slow increase of the ohmic series resistance of the ground potential PE.

**Figure 7.**Principle of a test setup used to generate arcs in a DC system to analyse the effect of those on the residual current.

**Figure 8.**Experimental results of scenario 1: Behaviour of the residual current depending on immediately switched capacitors between line and ground.

**Figure 9.**Experimental results of scenario 2a: Behaviour of the residual current depending on immediately switched resistors between line and ground.

**Figure 10.**Experimental results of scenario 2b: Behaviour of the residual current depending on slowly decreasing resistances between line and ground. 1: Resistance decreased from $R=1420\phantom{\rule{3.33333pt}{0ex}}\mathsf{\Omega}$ to $R=234\phantom{\rule{3.33333pt}{0ex}}\mathsf{\Omega}$. 2: Resistance decreased from $R=158\phantom{\rule{3.33333pt}{0ex}}\mathsf{\Omega}$ to $R=27\phantom{\rule{3.33333pt}{0ex}}\mathsf{\Omega}$.

**Figure 11.**Experimental results of scenario 3: Behaviour of the residual current depending on slowly increasing series resistances $0<R<10\phantom{\rule{3.33333pt}{0ex}}\mathsf{\Omega}$ connected in series with the ground potential PE.

**Figure 12.**Experimental results of scenario 3: Behaviour of the residual current in combination with an immediately disconnected neutral line N.

**Figure 13.**Experimental results of scenario 5: Behaviour of the residual current influenced by manually produced arcs in a DC circuit.

**Figure 14.**Experimental results of scenario 5: Detailed view of the residual current in combination with a manually produced arc at a load current ${I}_{DC}=10\phantom{\rule{3.33333pt}{0ex}}\mathrm{A}$.

**Figure 15.**(

**a**): Residual current on the AC side of a PV inverter depending on a typical DC input power timeseries. (

**b**): DC Input power timeseries as input data for the PV simulator based on combined and aggregated infeed measurements. The first half of the curve represents a sunny day, while the second half represents a cloudy day.

**Figure 16.**Analysis results of scenario 1: Instantaneous increase of the capacitive resistance by adding capacitors ($680\phantom{\rule{3.33333pt}{0ex}}\mathrm{nF}$ at 11:10, $470\phantom{\rule{3.33333pt}{0ex}}\mathrm{nF}$ at 11:35 and $220\phantom{\rule{3.33333pt}{0ex}}\mathrm{nF}$ at 12:48) between line and ground.

**Figure 17.**Analysis results of scenario 2b: Gradually decreasing (starting at approx. 8:50) respectively increasing (starting at 9:05) resistive load $230\phantom{\rule{3.33333pt}{0ex}}\mathsf{\Omega}<R<1.4\phantom{\rule{3.33333pt}{0ex}}\mathrm{k}\mathsf{\Omega}$ between line and ground.

Device Type | Frequency Range | Fault Detection | Environmental Adaption | Separation Leakage & Fault Current |
---|---|---|---|---|

Conventional RCD type A | f = 50 Hz, single band | Fixed threshold | No | No |

Conventional RCD type B | $DC$, $f>50\phantom{\rule{3.33333pt}{0ex}}\mathrm{Hz}$ (harmonics), single band | Fixed threshold | No | No |

Conventional RCM | $f>50\phantom{\rule{3.33333pt}{0ex}}\mathrm{Hz}$ (harmonics), single band | Variable threshold (manually set) | No | No |

Smart RCM | $DC<f<100\phantom{\rule{3.33333pt}{0ex}}\mathrm{kHz}$, multiple bands | Frequency selective variable threshold (manually set) | No | Yes |

Name | Unit | Description |
---|---|---|

$DC$ | mA | Direct current component of residual current |

$AC$ | mA | Sum of all alternating current components |

50 Hz | mA | Residual current in 50 Hz band |

<100 Hz | mA | Residual current in below 100 Hz band |

150 Hz | mA | Residual current in 150 Hz band |

100 Hz–1 kHz | mA | Residual current in mid frequency band |

>1 kHz | mA | Residual current in 1 kHz band |

>10 kHz | mA | Residual current in high frequency band |

**Table 3.**Photovoltaic simulator parameters used to simulate the irradiation behaviour of a typical PV plant.

Parameter | Value |
---|---|

Open Circuit Voltage | ${U}_{OC}=750\phantom{\rule{3.33333pt}{0ex}}\mathrm{V}$ |

Short Circuit Current | ${I}_{SC}=9\phantom{\rule{3.33333pt}{0ex}}\mathrm{A}$ |

Voltage @ Maximum-Power-Point (MPP) | ${U}_{MPP}=600\phantom{\rule{3.33333pt}{0ex}}\mathrm{V}$ |

Current @ MPP | ${I}_{MPP}=8\phantom{\rule{3.33333pt}{0ex}}\mathrm{A}$ |

Power @ MPP | ${P}_{MPP}=4.8\phantom{\rule{3.33333pt}{0ex}}\mathrm{kW}$ |

Scenario Number | Description |
---|---|

1 | Instantaneous increase of the capacitive resistance |

2a | Instantaneous decrease of the ohmic resistance |

2b | Gradually decrease of the ohmic resistance |

3 | Increased series resistances and broken lines |

5 | DC electric arcs |

**Table 5.**Summary of the subjectively perceived effects of specific faults on the residual current separated into frequency parts. 1: Influenced by sensor effects; 2: For ground potential PE; 3: For neutral line N.

Frequency Range | Scenario | ||||
---|---|---|---|---|---|

1 | 2a/2b | 3 ${}^{2}$ | 3 ${}^{3}$ | 5 | |

DC | → | $\to {\phantom{\rule{3.33333pt}{0ex}}}^{1}$ | → | → | |

$f>50\phantom{\rule{3.33333pt}{0ex}}\mathrm{Hz}$ | ↑ | ↑ | → | → | ↑ |

$f<100\phantom{\rule{3.33333pt}{0ex}}\mathrm{Hz}$ | ↑ | ↑ | → | ↓ | ↑ |

$f=150\phantom{\rule{3.33333pt}{0ex}}\mathrm{Hz}$ | ↗ | ↑ | → | ↓ | ↑ |

$100\phantom{\rule{3.33333pt}{0ex}}\mathrm{Hz}<f<1\phantom{\rule{3.33333pt}{0ex}}\mathrm{kHz}$ | ↗ | ↑ | → | ↓ | ↑ |

$f>1\phantom{\rule{3.33333pt}{0ex}}\mathrm{kHz}$ | ↑ | $\to {\phantom{\rule{3.33333pt}{0ex}}}^{1}$ | ↘ | ↓ | ↑ |

$f>10\phantom{\rule{3.33333pt}{0ex}}\mathrm{kHz}$ | ↑ | $\to {\phantom{\rule{3.33333pt}{0ex}}}^{1}$ | ↘ | ↓ | ↑ |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Behrends, H.; Millinger, D.; Weihs-Sedivy, W.; Javornik, A.; Roolfs, G.; Geißendörfer, S.
Analysis of Residual Current Flows in Inverter Based Energy Systems Using Machine Learning Approaches. *Energies* **2022**, *15*, 582.
https://doi.org/10.3390/en15020582

**AMA Style**

Behrends H, Millinger D, Weihs-Sedivy W, Javornik A, Roolfs G, Geißendörfer S.
Analysis of Residual Current Flows in Inverter Based Energy Systems Using Machine Learning Approaches. *Energies*. 2022; 15(2):582.
https://doi.org/10.3390/en15020582

**Chicago/Turabian Style**

Behrends, Holger, Dietmar Millinger, Werner Weihs-Sedivy, Anže Javornik, Gerold Roolfs, and Stefan Geißendörfer.
2022. "Analysis of Residual Current Flows in Inverter Based Energy Systems Using Machine Learning Approaches" *Energies* 15, no. 2: 582.
https://doi.org/10.3390/en15020582