## 5 Proposed Edge-Cloud Framework for Automated Fault Detection and Localization
### Building Blocks
#### 5.2.2 Cloud Side  
* Data historian  
The _Data historian_ is a back-office system designed to integrate and archive processed data efficiently. Based on the InfluxDB ([[https://www.influxdata.com/products/influxdb-overview/](https://www.influxdata.com/products/influxdb-overview/)]([https://www.influxdata.com/products/influxdb-overview/](https://www.influxdata.com/products/influxdb-overview/)), accessed on 20 February 2021) it is optimized to store and retrieve large volumes of time-series data quickly and efficiently, including high-resolution sub-second information that is measured very rapidly. The _MQTT broker_, based on the Eclipse Mosquito ([[https://mosquito.org/](https://mosquito.org/)]([https://mosquito.org/](https://mosquito.org/)), accessed on 20 February 2021) pushes the measurements from all edge nodes to the common _Database_, which can be accessed by data querying the _HTTP REST_ or _InfluxDB APIs_. The measurements from the data broker are in our case also used in parallel for providing the DSO with real-time grid observability (_WAMS_).
* Hosted application  
A _Hosted application_ is the computational heart of the FLA in the proposed edge-cloud framework and is composed of several building blocks. Once the notification of the fault is received by the _Hosted application_, the _Event handler_ ensures that the event is automatically and appropriately recorded in the _Event registry_. Next, the block _Get snapshot of data_ issues a query for historical data for a short time interval around the event's timestamp. The entirety of the voltage and current phasors are extracted from the _Time series databases_ of  
Figure 6: A full resolution of the phasor measurement unit (PMU) measurements for an event that triggered the event detector in a real-life environment: (**a**) Voltage measurements of the primary substation’s PMU; (**b**) Current measurements of the primary substation’s PMU; (**c**) Voltage measurements of the secondary substation’s PMU; (**d**) Current measurements of the secondary substation’s PMU.  
both PMUs, whereas the values of the active and reactive power for each load are obtained from the _Database_ of the _Data historian_. Upon receiving all of the requested data, the _Event localize_ block is run, which in its essence is the FLA presented in Section 3.3. The localization of the fault is performed according to the model of the EPS (see Section 4), where both the type of the network (grounded or isolated) and the parameters of lines are specified. The results of the _Event localize_ block are then appended to the corresponding fault in the _Event registry_. Lastly, the report, containing the information about the fault location, the setting that triggered the _Event detect_ block of the framework, the timestamp of the event's inception moment and the entirety of the phasors from both PMUs for a predefined time window around the fault's inception moment, is produced and sent to the _Fault visualization_ application in the _Control center_.  
Event characterization is part of our planned future work; therefore, the _Event characterize_ component in Figure 5 is connected to the rest of the existing _Hosted application_ components with a dotted arrow. The aim of the component will be to provide the DSO with further information regarding the fault, i.e., the value of fault resistance and fault type.