Uniﬁed Framework for the Analysis of the Effect of Control Policies on Automatic Voltage Regulators

—With the advent of smart grids, voltage ﬂuctuation has increased, especially in active distribution networks with a high penetration of distributed energy resources and a large de- ployment of electric vehicles. In this context, on-load tap-changer (OLTC) distribution transformers have become a key compo- nent, mainly because they provide automatic voltage regulation capability. In order to maximise the lifetime of OLTC devices, the number of tap operations should be minimised, avoiding unnecessary changes, but ensuring the main requirement: to keep the voltage within the limits permitted. Therefore, when the automatic mode is active, the control policy followed by the automatic voltage regulator is decisive. This paper presents a novel form of functional approximation of these policies. Furthermore, by means of a uniﬁed framework, a methodology for the simulation of policies based on control theory is proposed. The uniﬁed framework has been validated using real data. The results conﬁrm the ability of the introduced framework to simulate different scenarios, optimising and validating both existing and new policies by observing their effect on transformer behavior. In addition, it allows the determination of the best-ﬁt policies depending on characteristics such as the pre-selected voltage set point or the voltage variation between transformer taps.


I. INTRODUCTION
S MART grids are an essential component for the efficient use of power resources in modern societies. An important part of a smart grid is the distribution transformer (DT) which plays a critical role in low voltage (LV) grids, particularly in transformer substations. They regulate the transformation ratio for the different voltage levels of the grid. DT with onload tap-changers (OLTCs) have the ability to regulate online, adjusting the voltage level for end customers [1]. Traditional OLTC transformers are based on electromechanic tap changers [2], however, it is widely acknowledged that the combination of power electronics and OLTCs will be very common in the future [3], [4], [5]. Therefore, the conception of more efficient and optimized OLTC transformers is a relevant and active line of research nowadays [6].
Electromechanical OLTCs [7] can change the turns ratio in a series of predefined steps or taps by varying the secondary side voltage [8]. Tap changes are performed by a motorized OLTC, which has two main operational modes: automatic and manual. If the manual mode is active, tap changes are given manually, through external analysis of the electrical grid, determining whether the transformer's tap should go up or down. In the case of automatic control, there is an automatic voltage regulator (AVR) which follows a predefined control policy (CP) with the objective of maintaining the secondary side voltage level as close as possible to the given voltage set point, making as few tap changes as possible. The most widespread CP are of the hysteresis type, i.e., a tolerance band is defined and the time relative to the voltage deviation from the voltage set point is measured [9].
Defining an optimal CP is critical when automatic mode is running, as it will determine the behavior of the OLTC. Different policies lead to a different number of operations, with more or less voltage stability, especially when the penetration of renewables is high [10]. Some manufacturers base the CP for the AVR on a constant discrete step logic (also known as definite time), with two time-delay parameters associated with two voltage deviation levels [11]. However, in the strategies implemented by other manufacturers [12], [13], [14], [15], [16] the response time before each tap change can be calculated dynamically, relating the voltage set point deviation and time functionally, with linear or non-linear (integral) relationships. This makes the policy that controls the OLTC AVR optimal and flexible, following the given voltage set point and minimizing unnecessary tap changes. This type of logic is already followed in other fields of the electrical industry, for example, in the time-current curves that determine the waiting time before fuses make an interruption due to over-currents [17].
The existence of multiple and diverse CP strategies, and the fact that the manufacturers of OLTCs often specify the CP followed by the AVR in a variety of formalisms, make it necessary to unify the representation of these policies so that they can be investigated, compared and evaluated according to different criteria. Therefore, a unified representation of the AVR CP based on functional approximations is proposed.
From this form of representation arises the need to model the DTs with OLTC devices so that there can be a synergy conducive to the simulations. To this end, a type of modelling based on discrete time optimal control theory that can follow the CP in functional form is introduced, allowing the configuration of other parameters such as the number of OLTC taps or the voltage variations between them. A unified framework is proposed in which the expressions of the different CPs feed models of different DTs, taking into account other parameters, such as voltage set point or input voltages, to perform simulations allowing different evaluations. This complete process has been validated with real data obtaining up to a 99% match with the actual behavior of the transformer.
The paper is organized as follows: in Section II, we explain how the different transformers are modelled. Section III presents the most used common policies found in the literature. Section IV introduces a general framework that allows any policy to be represented. Section V describes the characteristics of our experimental framework to carry out the simulations of the ST. The experiments to evaluate the behavior of different policies are presented in Section VI. Section VII concludes the paper and discusses lines for future research.

A. Preliminaries
The behavior of a DT with an OLTC device in automatic mode is defined by the tap up or tap down decisions determined by the CP and sent by the AVR to the OLTC motorized device, which materializes them in voltage variations on the secondary side. Given the dynamic nature of the problem, where the evolution of the system (tap position) is time dependent and it is controlled by an external agent or planner (CP), it is inevitable to see the parallelism with the control theory.
So, we have relied on formulation of theoretical models for the optimal control problem with discreet time steps [18], [19], [20] in order to mathematically model the DT with OLTC. To this end, it has been necessary, firstly, to discretize the time mesh, the different characteristics of each OLTC have been taken into account: number of taps, voltage variation between taps, the time it takes for each change, etc.

B. Control Theory
Each electromechanical OLTC has a finite number of taps. In addition, the voltage variation between taps is also defined by a coefficient, ρ. So that, given the voltage at a particular tap position at an instant k (V k ), the voltage obtained by the corresponding tap changes (N ) is defined by (1), In this way, if for example, one tap is uploaded, voltage level will be increased 1 + ρ times. If two taps are lowered, 1 − 2ρ, i.e., the value and sign of N will be determined by the variation from the previous tap.
On the other hand, as time goes on, CP will decide whether to go up, down or maintain the tap. So, let T = {0, 1, . . . , n} be the set that contains the n t = n + 1 time instants where voltage and tap position are evaluated. The principal components, like in every control problem for discrete time models (discrete time steps), will be the independent variable, time, t ∈ T , the state variable (the tap position in each step), x = (x 0 , x 1 , . . . , x n ), the control variable (go up, down or maintain the tap position) u = (u 0 , u 1 , . . . , u n−1 ) 1 and the state function g(x k , u k , k) (this defines how the tap position changes taking into account the control variable). Fig. 1 illustrates the state variable x k that represents the corresponding tap position at instant k, and u k the decision control variable. Obviously, u k will represent the made decision that affects the next instant (k+1), whether to go up, down or maintain the current tap. Therefore, it follows directly that the state function satisfies the difference equation modelling scenario, i.e., the control state difference equation, 1 Note that state variable has one more component than the control.

C. Constraints
There are three different types of constraints, the control restrictions, which affect the control variables in each time step, the state-space restrictions, which affect the state variables in each time step and the contour restrictions.
Regarding control restrictions, there are two kinds of constraints, one regarding the resources available for each subtime slot ∆T , and another one regarding the limited values of each decision of the control variable.
About the limited values of each decision, since the only possible decisions are to go up, down or keep the tap, restriction can be written as follows in (3), This is because we are going to rely on a controller with discrete tap changes, in the case of controllers based on power electronics, continuous tap changes could occur, varying (3).
Regarding the available resources, if we have defined ∆T time period of size w, i.e., |∆T | = w, where only one decision could be made, the constraint can be expressed as follows in (4), This is due to the time it takes the OLTC to perform an operation, usually w = 2 or 3 seconds. Again, this is because we are considering an electromechanical transformer, in the case of an electronic based transformer, the tap change execution times would be much shorter.
About state-space restrictions that affect state variables, if p is considered as the number of taps of the OLTC of DTs, then, x i ∈ P = {1, . . . , p} ∀i ∈ T and with x 0 = avg({k} p k=1 ) . The initial tap of OLTC always is centred on the total number of possible taps. Normally if there are 9 taps (1,..,9) the initial tap is 5. As a consequence, it follows that if x i = 1, u i ≥ 0 and vice versa, if x i = p, then, u i ≤ 0.
Finally, the contour restriction is of the kind "fixed starting point and free end point".

A. Preliminaries
The main parameters of the AVR CP and their meaning are presented in more detail below. Next, some of the CPs offered by the main manufacturers for the control of their OLTC devices in automatic mode are explained.
When operating in automatic mode, the main OLTC AVR CP parameters will be the voltage set point (V set ), the bandwidth (BW ) [21] and the time delay [16] or response time (t delay ) [22], [23]. AVR follows the CP with the aim of keeping the voltage level as close as possible to the given V set by performing the fewest possible tap changes, so, the optimum V set has had to be stipulated beforehand in order to avoid over voltage and under voltage excesses [24].
Since this control method is based on the step-by-step principle, these policies are usually of the hysteresis type, a BW (allowed insensitivity range) is introduced to avoid unnecessary tap changes around the target voltage. The BW is usually symmetrical around V set [25], [10].
Typically, a standard regulator measures the busbar voltage (V meas ) on the LV side of the transformer and this voltage is used for voltage regulation. The voltage control algorithm compares the V meas with the V set and decides what action should be taken based on the difference ∆V = V meas − V set [9]. So, The main elements used to define a CP are: -Tolerance band width (BW ):The coefficient that determines the minimum tolerance range, symmetrical around the voltage set point, V set ± BW · V set , from which a deviation is considered to be already significant. -Voltage deviation (∆V ): It is the deviation of the output voltage of the transformer secondary side V meas from the given voltage set point V set . -Extreme times (t 1 & t 2 ): The time delays during which a minimum and maximum voltage deviation respectively can occur before a decision is taken. Different criteria are used to decide the optimal BW size, but the most common is that the total width of the tolerance band, i.e., (V set + BW · V set ) − (V set − BW · V set ) = 2 · BW · V set , must be greater than the range of voltage variation between taps ρ · V set . This is so that by overcoming the band on one side and changing the tap, it doesn't come out at the other end.
Since ρ is the voltage variation between taps and let α be the coefficient that determines how big the band is, (5) gives the coefficient of the band that determines the width on each side, in order to maintain voltage variations between taps lower than the band total width. Once the band has been determined, the minimum value of the voltage from which the first counter is activated is defined, ∆V min . In turn, there will be an associated time t 1 , as the allowed waiting time before the tap change. On the other hand, minimum voltage deviation from the band from which the second counter is activated, ∆V max , from the set point with its corresponding waiting time t 2 is also established (always t 2 < t 1 and ∆V max > ∆V min ).
Variations in the waiting time before changing the tap according to the voltage deviation ∆V follow different relations according to the CP. They can be discrete, linear, non-linear, etc. The possible strategies for determining the waiting time as a function of the voltage deviation and how to model them will be discussed in more detail later in the paper.

B. Policies
The CP associated with the AVR determines the time that elapses with respect to voltage variations before a decision is made regarding the change of tap. The longer the time, the greater the voltage variations, the shorter the time, the greater the number of tap changes. In order to illustrate the different types of policies currently used for AVR, as well as the way in which they are represented, an example of CPs developed by some manufacturers will be presented.
Both examples consist of real CPs associated with an AVR. In both cases, the parameters listed in Table I are followed, but with different functional relationships. The first example of a real CP associated with an AVR can be found in Ormazabal's manual [11]. In the second example, reference is made to an approach similar to that taken by Maschinenfabrik Reinhausen (MR) [12](page 72).
With respect to the first example, Fig. 2 illustrates the effect of a discrete-step policy applied to a voltage curve. The different discrete tolerance bands are well differentiated by colours. In green, the range of acceptability with respect to the V set can be seen (i.e., the BW of 1%), where the t delay or waiting time is infinite. In blue, the second tolerance range containing variations between 1% and 4% with the corresponding waiting time of 10 seconds can be seen. Finally, it can be seen, in red, that any voltage deviation greater than 4% has a delay time of 2 seconds. In the second example, once the BW has been calculated (or the minimum allowed deviation voltage from V set ), a function that relates the value of t to the deviation from the band is defined. In this way, the method needs to consider the function that relates the deviation from the band and the associated delay time t delay . As a practical example, Fig. 3 shows the effect of a control policy in which the waiting times are dynamic and depend on the voltage deviation. The t delay depends on the Function (6) and its effect has been illustrated by a gradient of blue colours. The darker the blue, the shorter the delay time.
As can be seen in the examples, the described methodologies are very different. However, they are totally valid and applicable. That is why it is important to develop a unified representation for this type of CP and others that exist.

IV. CONTROL POLICY FUNCTIONAL REPRESENTATION
The aim of this section is presenting a general formulation that accommodates the examples of policies described in the previous section and other possible policies.
To this end, it will be crucial to define a representation of the Function (6) in a standardized form, which will allow the calculation of the waiting times objectively.

A. Preliminaries
From now on, instead of considering the voltage deviation from the V set , we will frame the analysis on the voltage deviation with respect to the band, i.e., δ such that, Thus, the first factor determining a policy, given the ρ 3 value, will be the α coefficient, as this will determine the initial width of the band by means of (5).
Once the value of the band is known, five factors determine the policy: 1) δ 1 : minimum voltage deviation from the band from which the first counter is activated. 4 2) δ 2 : minimum voltage deviation from the band from which the second counter is activated. 3) t 1 : delay time before tap change associated with δ 1 . 4) t 2 : delay time before tap change associated with δ 2 . 5) Type of functional relationship describing the evolution of the waiting time (t delay ) with respect to δ (discrete, linear, etc).

B. General representation
As explained in Section IV-A, the time elapsed for each value of δ will vary according to the applied policy. The time values may change in a discrete way (definite time - Fig. 2), with an inverse non-linear relationship (integral time - Fig. 3), etc.
Therefore, given the alpha values (which determine BW ), δ 1 , δ 2 , t 1 , t 2 and the type of relationship, in this paper it is proposed to model a large set of AVR CPs currently applied using (8).
Hereafter, to simplify the notation, we will only show (8) for values of δ ≥ δ 1 . In addition, we refer to (8) as a "PREL representation" of Function (6) for simplicity, because it is a combination of polynomial, rational, exponential and logistic (PREL) functions.
It will be shown that it is possible to capture the nature of existing policies by adjusting the parameters of (8) in order to reproduce the intended policy behavior. This question can be posed as a typical parameter optimization problem. By conveniently setting the parameters of this equation, it is possible to represent not only currently used policies, but also new ones.
In short, representing a concrete policy consists of finding the coefficients A, B, . . . , H, in such a way that, once the PREL is defined, for each instant of time δ t=k can be measured, substitute it in P (δ k ) and then know the time steps that could be in that δ before changing the tap.
In general, to determine the corresponding coefficients, a parameter optimization process has been followed, differentiating according to the type of functional relationship desired. For example, in the case of the logistic function, a generalized expression of the logistic function, also called Richards' curve, has been used. For the exponential, rational and polynomial cases, the Levenberg-Marquardt method has been used, which calls a wrapper over least-squares algorithms. More details on this method in the reference [26].

C. Examples of instantiated policies
In this section it will be illustrated how the policy representation methodology can be applied. Let us discuss some example for a better understanding. First, how it is possible to capture the policies introduced in Section III-B will be illustrated.
Regarding the first example, we will try to capture a policy where the functional relationship between t and δ follows a "discrete jump relationship".
By means of parameter optimisation, it is possible to find the coefficients of (8) that satisfy these values and moreover follow the type of relation we are looking for, namely a "discrete jump relation" or definite time, Regarding the second example, we are looking for a hyperbolic curve (inverse exponential relationship between t and δ). Although different curves are presented in [12], (10) corresponds to the coefficients obtained by parameter optimisation based on the parameters shown in Table I.

D. Creating new policies using the PREL representation
A remarkable characteristic of the presented PREL representation is that it is possible to define a wide repertoire of policies with significantly different strategies. To illustrate this fact, we are going to use the same parameters as in the policy modelled in Section III-B, but with other functional relationships.
The policies corresponding to linear and quadratic relationships are respectively shown in (11) and (12).
The graphical representation of the functions previously presented can be seen in Fig. 4. As can be seen, the PREL representation can be used to represent existing policies or new ones, e.g., (11) and (12). Next, these representations can be linked with the simulation module, allowing them to be compared and choose the best one.
In summary, in this section it has been shown that it is possible to capture different policies using the same standard PREL representation and parameter optimization depending on the functional relationship we are looking for.
Once introduced how to model the OLTC of a DT based on control theory and the PREL representation of CPs, both will be fitted together using the unified framework to show their applicability in simulating the behavior of the transformer.

A. Preliminaries
In this section, the objective is to provide a unified framework to simulate the behavior of the DT for a given CP. In order to present the framework and validate its proper performance when simulating, we will rely on the historical data of the voltage of the transformer at a given and constant tap position X N , for example, V X N = (V 0 , V 1 , . . . , V k ).
However, in our simulation process, since the transformer will not be always in the same tap position X N , the value of the voltage will be modified based on which tap the transformer is. Equation (13) gives the expression for the calculation of the modified voltage (V k ) at time k, based on the original voltage at the same instant (V k ), the coefficient ρ, and the tap position (x k ), it is explicitly deduced from (1), In addition, x k is defined by the control state difference equation, i.e., (2). So, depending on the previous decision and tap position, u k−1 and x k−1 respectively, the voltage value at time instant k is determined, Obviously, when simulating the OLTC operation methodology based on historical data, it has to be taken into account that, when the tap position is changed in each step, all historical values after it will vary. Therefore, simulation cannot be carried out with a global perspective, as each step is affected by the previous steps.
However, since the optimal tap will be determined by the AVR CP step by step based on the previous step, it is only necessary to calculate the new voltage value for the next one, and only in the next step, for each iteration. That is, we will assume that a Markov process is followed.
Once the corresponding voltage simulation method has been defined, each CP will produce a sequence of different t delays , which will lead to different tap changes, and therefore, different voltage values on the secondary side.

B. OLTC simulation algorithm
Both the PREL way of representing policies and the control theory-based model for OLTCs are independently useful. But in addition, one of the main uses that can be given to them is to integrate them together to study the behavior of the DT following a given CP.
Given the time series with the historical voltage values, the pseudocode to simulate the OLTC control process is described by Algorithm 1.
All the functions included in the pseudocode also take into account characteristics that are intrinsic to the problem, e.g., the state Function (2) g checks that the returned tap is within the permitted limits. As can be seen, the CP is decisive, since it will be decided whether to go up or down depending on the number of steps in time in which one of the limits is exceeded.  (9), (10), (11) and (12).

C. Framework Validation
To validate this methodology, both for policy capture and the simulation of OLTCs, data from an Ormazabal's DT have been used 5 . Two time series of 86400 values have been used, i.e., one day of voltage recordings, one voltage measurement every second. For each case, we have the average output voltage value of the transformer, the tap where it was located and the established voltage set point.
In Table II, the parameters of the distribution transformer used as a reference for the validation carried out with real data are shown. Since the OLTC behavior data were known, i.e., tap changes made, voltage variation between taps, etc., by reverse engineering the voltage curves that would have been produced in the absence of OLTC have been estimated. By applying the introduced framework on these curves, the behavior of the transformer under the effect of different CPs can be studied.  (1,9) Since the policy followed by the voltage regulator in the original data is known, the presented unified framework can be validated. First, the transformer is modelled with its characteristics, then, the policy is captured through its PREL representation, finally, the policy is applied on the transformer model under the voltage curve. The expected result would be the original curves (measure values, i.e., the curve before applying the reverse engineering). The results are shown in Fig. 5. The real data can be seen in blue, in orange the simulated data based on the policy that is implemented, the title of both figures represents the success rate, which has been defined as the number of taps that match between reality and simulation. As can be seen, the success rate in the simulations is very high, close to 100% in both cases. In addition, the reason for not obtaining 100 percent has been identified.
The main reasons are twofold, first, that the time it takes to perform a tap change has been considered constant (w = 3), but in reality it can vary (w = 2, 3 or 4). Secondly, it is due to a rounding error in the operations carried out, sometimes exceeding 1% of voltage deviation, when in reality it was not exceeded.

VI. EXPERIMENTS A. Objectives
The goals of our experiments are: 1) Evaluate the accuracy of the CP PREL representation for describing the behavior of OLTC on real data. 2) Determine the capacity of the unified framework to simulate currently used CPs in the AVR. 3) Compare the performance of different CPs. 4) Explore the sensitivity of the CP to parameter variations (δ 1 , δ 2 , t 1 , t 2 and the type of functional relationship we are looking for).

B. Performance indicators
To evaluate the results, two criteria have been considered, • The error between obtained voltage values and the corresponding V set . • The number of tap changes. In order to evaluate the error, two scores have been used, the MSE (Mean Squared Error) and the MAPE (Mean Absolute Percentage Error).
Other indicators can be found in the literature, for example, percentage of time outside bandwidth [10]. However, since this work will consider BW of different sizes and, in general, CPs with variable limits, we have not considered such a representative parameter.
To carry out the tests, the same time series as those presented in the Section V-C have been used.

C. First Real Dataset
The goal of the experiment carried out is to compare the performance of four different CPs described by equations (15)- (18). Sensitivity to parameter variation will also be analysed. Each policy has been generated based on parameters contained in Table III. Based on these parameters and relative to each type of functional relationship, the PREL representations are described in (15)- (18).
Note that in the discrete and exponential case they coincide with (9) and (10) respectively, i.e., with the examples initially mentioned in Section IV-C that correspond to real policies. Table IV lists the results after simulation of OLTC performance across each of the policies using the unified framework. Note that the first row of Table IV is the specific case of Ormazabal's transformer. As can be observed in Section V-C, the simulation has coincided with the results in the field in 99.15% of the decisions taken. "Op. nº" represents the number of OLTC tap changes predicted by the simulation. Table IV shows that, using the same δ and t parameters, simulations predict the same amount of tap changes, however, the error varies, which implies that even for practically identical conditions, the OLTC behavior for each policy is different. This highlights the importance of the different functional relationships of the CPs. A better trend with the inverse exponential relationship can be seen, as with the same number of operations it has produced a smaller error value.
We will further investigate the robustness of some of the policies. The sensitivity of the exponential and quadratic policies will be investigated by slightly varying the values of δ and t and observing the fluctuation of the scores (MSE, MAPE and the number of tap changes). The obtained results are listed in Table V.
Analysing Table V, it can be observed that, whereas variations in t affect both expressions similarly, variations in δ do not (whereas the exponential ratio gives better results in terms of error for δ 1 = 0 ≡ BW , the quadratic ratio gives better results for δ 1 = 0 ≡ δ 1 > BW ). This leads us to hypothesize that for high voltage initial tolerances, the quadratic relationship might work better.
In conclusion, thanks to this experiment, it has been possible to analyse the performance of the same type of policies with real data, highlighting the flexibility of the framework. In addition, it has been possible to briefly illustrate a sensitivity analysis.

D. Second Real Dataset
In this second and final experiment, a methodology is presented to find the best CP under specific circumstances and restricting the number of tap changes. For this purpose, the results of each CP are compared under the constraint that After this, the performance of the unified framework will be illustrated in more detail by means of an example with the best CP found. At the end of the section, we will illustrate the application methodology of the unified framework with a simple example. Again, in this case, the parameters of the OLTC are analogous to those previously shown in Table II, and the V set now is 236V .

1) Best CP:
Some combinations of parameters δ 1 , δ 2 , t 1 and t 2 have been recorded so that the number of tap changes is exactly 44. Obviously, the possible combinations have been restricted within consistent parameters, specifically, δ 1 : from 0 to 2, δ 2 : from 3 to 6, t 1 : from 40 to 70 and t 2 : from 0 to 6.. The main results obtained are listed in Table VI. More feasible combinations of the parameters have been found with less than 45 tap changes, in particular, the number of feasible combinations found has been discrete: 936, linear: 1671, exponential: 1719 and quadratic: 1527. However, those of 44 are reflected because they are the most representative.
The exponential relationship is the one that obtains the best results, as can be seen in Table VI. However, the next best is the linear relationship and not the quadratic one. The parameters for which a lower MSE and MAPE is obtained in the exponential relationship coincide. Specifically, these parameters are shown in Table VII. Therefore, for this configuration of the DT, the best performing policy with less than 45 tap changes, restricted to our search space, is the one following an inverse exponential relationship described by (19), The δ−t curves that follow the best CPs found for each type of functional relationship are shown in Fig. 6. It can be seen how the best quadratic and linear policies are almost identical. Therefore, three large and distinct sets can be distinguished, i.e., the exponential, the discrete and the linear-quadratic. This experiment highlights the usefulness of the introduced model. Thanks to its flexibility, it has not only been possible to find the CP that best suits the specified needs, but also to compare the performance among multiple control policies and to predict the OLTC behavior under a particular CP.
2) Detailed performance of the unified framework for exponential policy found: Table VII lists the parameter configuration for exponential policy generation. The PREL representation can be observed in (19). Fig. 7 illustrates the evolution over time obtained from the policy simulation. From top to bottom, one can see the waiting time, the voltage value, the δ value and the tap position respectively. The grey curve represents the used time series, i.e., the real input voltage at constant tap (x N = 5). On the other hand, the red curve represents the obtained voltage after tap changes decided by AVR through CP application. It can be seen how the red curve is centred around the V set (236V , dashed line), so the algorithm is being applied correctly.
The upper graph shows the evolution of the waiting times according to the δ deviation (voltage deviation from the BW ), in the areas where there are no values, because δ is less than δ 1 , and the allowed time is infinite.
The graphs at the bottom represent the evolution of the δ and the tap position respectively. The correct functioning of the OLTC can be appreciated in the simulation.
3) Unified Framework application example: This section provides an example under the CP described in (19) (with the conditions of the transformer listed in Table  II with 236V as V set ).
Suppose that a voltage level of 241.9V is measured at time instant t = k, i.e., a deviation of 5.9V from the V set = 236V . This corresponds to a deviation of ∆V = 2.5%. If it is passed to δ through (7), taking into account the band (BW coefficient 0.01 ≡ 1% (see (5))), δ k = 1.5 is obtained.
Substituting δ k in (19) P (1.5) = 15.62. This is the time to wait before lowering a tap if the voltage were maintained at that level. If, at the next instant (k + 1), δ k+1 = 3, then P (3) = 4, that is, it would wait for 4 seconds, but it would already be 2 seconds out of limit (for k and k + 1), that is, if at k + 2 and k + 3, δ k+2 = δ k+3 = 3, a tap would be lowered.
The complete process of the example, shown schematically, can be seen in Fig. 8. Upon completion of the experiments, it is worth reviewing the fulfilment of the initial objectives. First, the ability to accurately represent the behavior of transformers under the effect of existing CPs based on different voltage curves has been demonstrated. Furthermore, it has been shown how, in a simple way, the framework allows a large variety of policies to be captured. It also allows them to be compared with each other, using different meaningful metrics. This makes it possible to select the most appropriate CP for each case.
Finally, a methodology capable of assessing the sensitivity of the policies to the variation of the parameters that compose them has been introduced.

VII. CONCLUSION
The work presented in this paper departs in different ways from previous research. We introduce a novel way of simulating transformer behavior under the effect of different CPs to the AVR. The framework developed allows a basic hysteresis control to be combined with a dynamic determination of the t delay , without, however, limitations regarding a specific type of functional relation.
The t delay before changing the tap is dynamic and voltage dependent, but in this case, the functional relationship is defined by the CP associated with the AVR. Once the voltage band is exceeded, the waiting time is dynamically determined and decisions are made. The case of fixed times or timevoltage curves presented in previous articles shall only be a particular case of the unified framework.
The following contributions have been presented in this work, 1) A way to model DT based on control theory is proposed.
2) A methodology for representing AVR CP based on functional approximations is proposed, i.e., PREL. 3) A unified framework to study the effect on the behavior of DT OLTC when applying different AVR CP is introduced. 4) Policies corresponding to two manufactures have been analysed using the introduced framework. 5) The behavior of different CP is evaluated by varying parameters using a benchmark of real voltage data. 6) A statistical method for determining the best CP with the best overall performance for the voltage data given is introduced. The ability to represent CPs functionally has facilitated the integration of different AVRs in the OLTC, evaluating the behavior of DTs through simulations in the unified framework.
It has been possible to capture existing CPs or even generate new policies that have never been tested before. These CPs have determined the behavior of the DT in the simulations, allowing different results to be compared. This is critical, since the advent of EV and DG will increase voltage instability in the grid, making it crucial to have this type of tool to determine the optimal CP for the DT.

A. Future Work
Only some specific circumstances have been presented, regarding the type of transformer (ρ, p, w, ...) and the type of CPs, but more circumstances remain to be included. OLTCs could be proposed with more taps, with different voltage variations, variable voltage set points, policies with other δ-t functional relationships, continuous tap changers, etc.
It would also be necessary to design an algorithm that, depending on all the available variables, would find the optimal policy given a DT with contour characteristics and a voltage set point. For this purpose, starting from the discrete time step control theory-based model, the CP model could be introduced and the optimization problem could be solved. In addition, similar to the tests performed for 44 tap changes in Section VI-D, a Pareto frontier could be posed that considers the multiple OLTC objectives and returns the set of non-dominated solutions.
ACKNOWLEDGMENT I. García would like to thank Ormazabal Corporate Technology and the data analysis team for the facilities and support provided in the process developing this article.