## 2 Our Proposed Solution
The aim is that all voltages are inside the allowable limits fixed by the DNO. An IF-THEN production rule set represents the domain knowledge in the RBES. The data are associated with a fact set about the current situation. The data and rules are then compared with the facts in the database. When the conditions of the rule match a fact, the system fires the rule and its active component is executed. A code that has the following syntax:  
\"IF conditions, THEN actions.\"  
belongs to each rule. The rule-based reasoning method is integrated into the inference engine and used to analyse the data. The knowledge base contains the rules designed to guide the system in performing its task (suitable voltage level according to the power quality performance standard). Thus, the expert system has the goal, and the inference engine attempts to find the evidence to prove it. First, the knowledge base is interrogated to find rules that might lead to the desired solution. Such rules must have the goal in their THEN (action) parts. If such a rule is found and the part of the condition associated with IF matches data in the database, then the rule is fired, and the goal is proved. The information collected during a time slot \(s\) by smart meters (active and reactive powers) installed at the end-user level (prosumers and consumers) is sent to the data concentrator from the EDS level through the communication system. The data belong to an operation regime of the active LVEDN where the tap position of the OLTC, identifiedby the variable \(\alpha\), corresponds to the previous time slot (s \(-\) 1), with s = 1,..., S, with S representing the analysed period. The RBRS establishes the tap position of the OLTC starting with the time slot s, s = 1,..., S, based on the data obtained from the steady-state calculations using the tap position from the time slot (s \(-\) 1), \(\alpha_{(s-1)}\), and the information from the database (static and dynamic). The next step confirms that the data availability to determine the extreme values (minimum and maximum) of the voltage at the level of active LVEDN. \[\begin{array}{l}\mathrm{V}_{\mathrm{s},\alpha_{(s-1)}}^{\mathrm{min}}\ =\ \ \min_{ \gamma\in\{\gamma_{\mathrm{a}},\gamma_{\mathrm{b}},\gamma_{\mathrm{c}}\}}\ \ \left\{\mathrm{V}_{\mathrm{e},\mathrm{s},  
\(\Delta\text{V}_{\alpha}\) represents the voltage changes per tap.  
However, the tap position can be modified only if the constraints regarding the dead band (DB) of the OLTC are satisfied [42]:  
\[\left(\frac{\text{V}_{\text{s},\alpha(s-1)}^{\text{max}}-\text{V}_{\text{r}}}{ \text{V}_{\text{r}}}\right)>\text{DB};\ \left(\frac{\text{V}_{\text{r}}-\text{V}_{\text{s},\alpha(s-1)}^{\text{min}}}{ \text{V}_{\text{r}}}\right)>\text{DB};\text{s}=1,\ldots,\text{S}\,\ \alpha=1,\ldots\text{A} \tag{9}\]  
where \(\text{V}_{\text{r}}\) is reference voltage. The tap position can be changed only when the voltage deviation exceeds DB (having the value \(\Delta\text{V}_{\alpha}/2\)). The use of the dead band can avoid the effects of unnecessary tap-changing operations. Figure 3 presents the flow chart of the voltage control using rule-based reasoning. Figure 3: The flow chart of voltage control using rule-based reasoning. The user can ask the expert system how it reaches a particular conclusion through the explanation facilities, which allows one to understand the reasoning behind the decision. The RBES can provide a credible and effective solution based on a clear explanation of its analysis and guidance. The proposed guidance is systematic, evaluating the effects of the voltage control on the operation of the active LVEDN, avoiding conflicts between the rules. Although these components represent the core of the RBES, additional parts could be integrated. One of these is the external interface that allows the RBES to interact with other programs and data files used commonly by DNOs (SMS, SCADA, Demand Management System). The main characteristics of the proposed RBES are efficiency and resilience.