Voltage RMS Estimation during a Fraction of the AC Period

The increasingly widespread occurrences of fast-changing loads, as in, for example, the charging of electrical vehicles and the stochastic output of PV generating facilities, are causing imbalances between generated and consumed power flows. The deviations in voltage cause noteworthy technical problems. The tap-changers in today’s transformers are slow-reacting and thus cannot effectively correct the imbalance. Tap-changers should be replaced by special appliances, installed in distribution lines, that can effectively estimate voltage RMS and refine imbalances during a fraction of the AC period, preferably less than half. This article suggests specially developed methods for RMS assessment based on approximating instantaneous voltage magnitudes using harmonics and correcting coefficients.


Introduction
The problem of voltage correction in distribution lines has become more and more actual during the last ten years. The extensive dissemination of consumers having fastchanging loads, such as in-charge batteries in electric vehicles, electric trains being in the accelerating-decelerating modes, and so on, together with the stochastically generating plants (PV and wind power stations), has produced a significant challenge for distribution lines. This problem has been caused by significant stochastic energy flows and the inability of the transformer's tap-changer to prevent dip and sag voltage deviations, which can cause inevitable problems for electrical/electronic equipment. Therefore, the grid should solve this problem by maintaining stable voltage levels. The scientific literature gives multiple examples of research works elaborating on the problem of voltage regulation and stabilization in distribution lines. Owing to the high voltage and power applications in distribution lines, the use of the reactive power concept seems like an attractive and efficient method [1][2][3][4][5][6][7][8][9][10][11]. Keddar et al. proposed reactive power sharing for voltage control [1], and Mehbodniya et al. [2] applied reactive power management in the smart distribution network enriched with wind turbines and photovoltaic systems. Iioka et al. [3] and Zimann et al. [4] suggested voltage improvement through current and reactive-active power injection into a grid. Ismail et al. provided a comprehensive review of reactive power compensation for voltage stability improvement and power loss reduction [5]. Aziz and Ketjoy used reactive power control for voltage stabilization during the enhancement of PV penetration in the grid [6]. Kim and Harley examined the effect of the reactive power control of photovoltaic systems on electric power grids for the development of an effective voltage-regulation method [7]. Ma et al. suggested with the same aim a reactive power optimization of substations [8], whereas Mirbagheri and Merlo proposed the optimization of a reactive power flow for voltage regulation in a grid [9]. Cárdenas et al. submitted a dynamic voltage restorer for voltage restoration using reactive power, and active filtering [10], whereas Hu et al. promote coordinated active and reactive power control for distribution networks [11]. Salah Saidi analyzed the actual voltage stability of Tunisian distribution networks with dynamic reactive power control [12].  This article gives a deep analysis of the main RMS voltage assessments including well-known standard RMS methods, as well as those developed in this work. The authors developed an original math method for the decomposition periodic signal by an arbitrary set of harmonic series. In addition, a combined approach of a fast RMS determination based on a restricted measuring time significantly less than half of the AC period was developed in this work. It was shown that for the effective correction, an RMS value should be estimated at a time that is less than the half of the AC period. The remaining time in the first half of each AC period can be necessary for the control system to calculate the required value of reactive power and to attach it to the grid before the beginning of the next half. This solution ensures the fastest correcting reaction for returning the voltage magnitude between the lowest and highest permissible levels.
The main contributions of work are the following: • A deep analysis of the RMS magnitude assessment by the standard formulation and by peak voltage value was provided analytically and experimentally. • Development of the original math approach for the decomposition of a function of an instantaneous voltage magnitude by harmonic series based on the solution of the system of linear algebraic equations.

•
The development of a combined fast RMS determination approach that ensures the estimation during a restricted measuring time significantly less than half of the AC period and that is based on the application of a special coefficient obtained analytically as a function of the measuring time.

•
The assessment of all represented methods for RMS estimation experimentally.
Section 2 represents an analysis of the accuracy of the four main RMS assessment approaches; Section 2.1 presents a method of measuring by the voltage magnitude; Section 2.2 represents an instantaneous voltage measurement during the integer number of all AC periods; Section 2.3 presents the development of a method based on voltage magnitude measurement in only a fraction of the AC period, and Section 2.4 presents the development of a method based on fitting measured points with arbitrarily chosen voltage harmonics. Section 3 represents the results of the experimental accuracy verification of all mentioned RMS estimation methods.
Section 4 summarizes the actuality of the work and provides the brief results. Section 5 presents the conclusions of the article.

Methods of the Fast RMS Estimation
The four main methods to be analyzed are: a. Measurement by voltage amplitude-maximum value in the AC period. b.
Estimation due to strict math RMS determination through the entire AC period. c.
Assessment through only a fraction of the AC period with a correcting coefficient. d.
Fitting measured points with trigonometric functions representing voltage harmonics.

Measurement by Voltage Amplitude
Estimation of the RMS voltage value by means of this method ( Figure 1) is carried out based on the instantaneous magnitude measured with the the expression describing RMS determination: Section 2 represents an analysis of the accuracy of the four main RMS assessment approaches; Section 2.1 presents a method of measuring by the voltage magnitude; Section 2.2 represents an instantaneous voltage measurement during the integer number of all AC periods; Section 2.3 presents the development of a method based on voltage magnitude measurement in only a fraction of the AC period, and Section 2.4 presents the development of a method based on fitting measured points with arbitrarily chosen voltage harmonics.
Section 3 represents the results of the experimental accuracy verification of all mentioned RMS estimation methods. Section 4 summarizes the actuality of the work and provides the brief results. Section 5 presents the conclusions of the article.

Methods of the Fast RMS Estimation
The four main methods to be analyzed are: a. Measurement by voltage amplitude-maximum value in the AC period. b. Estimation due to strict math RMS determination through the entire AC period. c. Assessment through only a fraction of the AC period with a correcting coefficient. d. Fitting measured points with trigonometric functions representing voltage harmonics.

Measurement by Voltage Amplitude
Estimation of the RMS voltage value by means of this method ( Figure 1) is carried out based on the instantaneous magnitude measured with the the expression describing RMS determination: Taking into consideration voltage as a sum n-sinus harmonics of a time, i.e.: Voltage RMS is calculated as: As a rule, a voltage in distribution networks has a good harmonics quality and low THD value. Therefore, a good approximate RMS can be assessed with the amplitude of a main harmonic: Taking into consideration voltage as a sum n-sinus harmonics of a time, i.e.: Voltage RMS is calculated as: As a rule, a voltage in distribution networks has a good harmonics quality and low THD value. Therefore, a good approximate RMS can be assessed with the amplitude of a main harmonic:

Estimation by Voltage Points Measured during the Integer Number of Entire AC Periods
Assume N equidistantly dispersed points of a voltage magnitude obtained during the integer number of the AC periods. This way the RMS value will be calculated as per its rigorous mathematical determination: However, the requirement for a voltage correction of less than half of a period dictates the need for the RMS estimation in a fraction of the AC period.

Assessment through Only a Fraction of the AC Period
If the measured points of instantaneous voltage values were obtained during a fraction of an AC period only, the application of expression (5) leads to a rough error and is not applicable. For the correct RMS estimation expression, (5) should be modified.
For the AC frequency 50 Hz, the time of voltage measurements should be not less than 5 ms to overcome sinus amplitude. Owing to the requirements of a voltage correction during the half of an AC period, the measurement time cannot be more than 6-7 ms maximum. The remaining 3-4 ms to the half (10 ms) of a period are needed for the control system to evaluate a situation and decide which reactive power (capacitive or inductive) to correct voltage. If voltage RMS lies between permissible levels (+/−10% of its rated magnitude), the control system does not introduce reactive power into a network.
Assuming the measurement time from 5 ms to 10 ms, the time will be represented by the angle (βπ), where π is half of the period and β is the dimensionless coefficient. The expression for the RMS estimation will be: After simplification and substitution (βπ) instead of variable θ: For voltage U * RMS to be identical to U RMS = V m √ 2 it must be multiplied by the correction coefficient K C equal to: The dimensionless coefficient β value is the derivative of measuring time t mes : β = π t mes 10 ms , for AC frequency 50 Hz The graph of a coefficient K C vs. β value is represented in Figure 2. When voltage measurement is represented by a set of M-instantaneous voltag during a fraction of the AC period, for instance from a ¼ to ½ of its duration, t assessment is made due to the following expression: where KC is calculated due to (8) considering measuring time tmes and β value from

Fitting Measured Points with Trigonometric Functions Representing Voltage Harm
Another efficient method for the RMS estimation of periodic signals is the re tation by a sum of k-first sinusoidal harmonics. The choice of sinusoid usage for proximation is dictated by a form of a real voltage signal.
To estimate RMS with the proposed method, it is enough to obtain the ha amplitudes and furthermore to represent the RMS as: For the approximation of the measured points, a least-mean-square approac will be applied: where S-the criterion of approximation, Vi-is the i-measured instantaneous (from the set of N-voltage points) obtained in a ti moment of a time, A1-A2k−1-th tudes of harmonics, and ω-the base frequency of a voltage signal.
To get a minimum of the criterion S, all partial derivatives dS/dAi should b ized to zero: When voltage measurement is represented by a set of M-instantaneous voltage points during a fraction of the AC period, for instance from a 1 4 to 1 2 of its duration, the RMS assessment is made due to the following expression: where K C is calculated due to (8) considering measuring time t mes and β value from (9).

Fitting Measured Points with Trigonometric Functions Representing Voltage Harmonics
Another efficient method for the RMS estimation of periodic signals is the representation by a sum of k-first sinusoidal harmonics. The choice of sinusoid usage for the approximation is dictated by a form of a real voltage signal.
To estimate RMS with the proposed method, it is enough to obtain the harmonics amplitudes and furthermore to represent the RMS as: For the approximation of the measured points, a least-mean-square approach (LMS) will be applied: where S-the criterion of approximation, V i -is the i-measured instantaneous voltages (from the set of N-voltage points) obtained in a t i moment of a time, A 1 -A 2k−1 -the amplitudes of harmonics, and ω-the base frequency of a voltage signal. To get a minimum of the criterion S, all partial derivatives dS/dA i should be equalized to zero: The set (13) represents the system of k-linear algebraic equations, which can be solved in matrix form: a 11 a 12 a 21 a 22 · · · a 1k · · · a 2k · · · · · · a k1 a k2 · · · · · · · · · a kk where:

Results
Following the methods of the RMS voltage estimations presented here, the set of laboratory measurements was carried out to verify the accuracy of all submitted approaches. For the verification of the RMS measurement approaches and comparison between different suggested methods, the laboratory setup was created (Figures 3 and 4). It includes the laboratory AC voltage source DRTS 33 [36], which is able to simulate real AC voltage with an arbitrary harmonic content, and the voltage transducer CV 3-500 [37], which translates high instantaneous network voltage amplitudes to low-voltage signal. The analog converter developed by authors scales and shifts the output voltage of the transducer CV 3-500 to the analog A/D input through the use of a Teensy 4.1 controller. The resistive components in the analog converter have the following magnitudes: R1 = 15.54 kΩ, R2 = 15.32 kΩ, R3 = 1 kΩ, and Rf = 9.88 kΩ.    The AC source simulated real voltage signal with a content from the first up to the twenty-fifth odd harmonic.
The magnitude of each harmonic was determined by the standard [38]. These are represented in Table 2.

Results of the RMS Estimation Due to the Amplitude of the Signal
This method, despite being simple and easily applicable, provides the lowest precision of the RMS assessment that is not influenced by the sampling time. This method's error is a result of an instability of a voltage signal as well by a lack in the synchronization of the measuring amplitude magnitude. Altogether, for the existing A/D converters, the error value lies between 1.30-1.50%. The controller translates the analog signal to digital information and estimates the voltage RMS each 6-7 msec comparing it to the nominal value. The controller decides which reactive power value should be introduced to the load when the voltage level overcomes permissible boundaries. Moreover, the controller calculates a required capacitance, determines that the capacitors in the bank are suitable to be connected to a load, and sends the signals to the appropriate SCR drivers that are responsible for connecting/disconnecting specific capacitors. In addition, the laboratory equipment for supervising the experimental process and accepting decisions used a digital A/D 10-bit transducer digitizing 2000 uniformly distributed magnitudes per one period of the AC signal and acquiring data in the built-in memory.

Results of the RMS Estimation by the Sampling of a Signal
The AC source simulated real voltage signal with a content from the first up to the twenty-fifth odd harmonic.
The magnitude of each harmonic was determined by the standard [38]. These are represented in Table 2.

Results of the RMS Estimation Due to the Amplitude of the Signal
This method, despite being simple and easily applicable, provides the lowest precision of the RMS assessment that is not influenced by the sampling time. This method's error is a result of an instability of a voltage signal as well by a lack in the synchronization of the measuring amplitude magnitude. Altogether, for the existing A/D converters, the error value lies between 1.30-1.50%.

Results of the RMS Estimation by the Sampling of a Signal
The voltage magnitude sampling with correcting coefficient provides much more precision for the RMS assessment. However, this depends on the sampling time. Figure 5a-c shows a relative error histogram for the sampling times of 5, 7, and 9 ms. The voltage magnitude sampling with correcting coefficient provides much more precision for the RMS assessment. However, this depends on the sampling time. Figure  5a-c shows a relative error histogram for the sampling times of 5, 7, and 9 ms. The root mean square error with its standard deviation (STD) for this method is represented in Figure 6. The error and its STD tend to decrease with a sampling time. The error for the suitable sampling time (6-7 ms) can be no more than 0.4-0.6%.

Results of the RMS Estimation by Decomposing the Signal to Odd Harmonics
The decomposition of a signal to odd harmonics theoretically should ensure the most accurate results of the RMS value. This approach, despite being accurate, requires significant computational effort that increases as the number of harmonics increases. Considering this circumstance, the RMS estimation error should be investigated in detail.
Histograms of relative error for one-harmonics RMS estimation with the sampling times of 5 ms, 7 ms, and 9 ms are represented in Figure 7. The same histogram form is for two-and three-harmonics signal decomposition. The root mean square error with its standard deviation (STD) for this method is represented in Figure 6. The voltage magnitude sampling with correcting coefficient provides much more precision for the RMS assessment. However, this depends on the sampling time. Figure  5a-c shows a relative error histogram for the sampling times of 5, 7, and 9 ms. The root mean square error with its standard deviation (STD) for this method is represented in Figure 6. The error and its STD tend to decrease with a sampling time. The error for the suitable sampling time (6-7 ms) can be no more than 0.4-0.6%.

Results of the RMS Estimation by Decomposing the Signal to Odd Harmonics
The decomposition of a signal to odd harmonics theoretically should ensure the most accurate results of the RMS value. This approach, despite being accurate, requires significant computational effort that increases as the number of harmonics increases. Considering this circumstance, the RMS estimation error should be investigated in detail.
Histograms of relative error for one-harmonics RMS estimation with the sampling times of 5 ms, 7 ms, and 9 ms are represented in Figure 7. The same histogram form is for two-and three-harmonics signal decomposition.

Average errors (%)
Absolute number in200 samples The error and its STD tend to decrease with a sampling time. The error for the suitable sampling time (6-7 ms) can be no more than 0.4-0.6%.

Results of the RMS Estimation by Decomposing the Signal to Odd Harmonics
The decomposition of a signal to odd harmonics theoretically should ensure the most accurate results of the RMS value. This approach, despite being accurate, requires significant computational effort that increases as the number of harmonics increases. Considering this circumstance, the RMS estimation error should be investigated in detail.
Histograms of relative error for one-harmonics RMS estimation with the sampling times of 5 ms, 7 ms, and 9 ms are represented in Figure 7. The same histogram form is for two-and three-harmonics signal decomposition. The average relative RMS error for one-, two-, and three-harmonics representations are shown in Figure 8. The average relative RMS error for one-, two-, and three-harmonics representations are shown in Figure 8. As in the previous method, the error decreases with the increase in sampling time and with more significant harmonics signal decomposition. The STD of an error can be even more than its average value and comprises 0.6-1%. This circumstance can be explained by the relatively low value of an average error having scattered statistics.
The accuracy of this approach for a one-harmonics representation is close to that of a previous method based on sampling voltage magnitudes. However, it became significantly more accurate with the use of two-or three-harmonics. The average error in this case for the (6-7 ms) sampling time is less than 0.25-0.35% substantially better than for the method based on voltage sampling in a fraction of the AC period time.

Discussion
The requirement to keep voltage inside narrow boundaries over time has grown into an actual obligation during the last ten years. The need for fast voltage correction in distribution lines and other important locations in electric grids has become more and more tangible. The widespread fast-changing loads and stochastically generating plants produce a significant demand for finding appropriate and efficient solutions for preventing voltage deviations. The inevitable part of any control system aiming to keep a constant voltage level is the entity able to estimate the voltage RMS during a short time. The existing methods and means as a rule provide such a measurement during relatively long times, including many AC periods. The authors were motivated to find and analyze methods of RMS assessment in a time shorter than half the AC cycle duration. The main reason for such a task is the technical request of some sensitive consumers to ensure voltage constancy in each AC cycle.
The three most affordable approaches were studied in the proposed work. The first method is based on the RMS relation with the amplitude of a sinusoidal signal. Two other solutions were developed by the authors. The second method uses a restricted sampling time of voltage magnitudes in the fraction of the AC period with the application of a Average error (%) Figure 8. The average relative route-mean-square error for one-two, and three-harmonics representations as per sampling time.
As in the previous method, the error decreases with the increase in sampling time and with more significant harmonics signal decomposition. The STD of an error can be even more than its average value and comprises 0.6-1%. This circumstance can be explained by the relatively low value of an average error having scattered statistics.
The accuracy of this approach for a one-harmonics representation is close to that of a previous method based on sampling voltage magnitudes. However, it became significantly more accurate with the use of two-or three-harmonics. The average error in this case for the (6-7 ms) sampling time is less than 0.25-0.35% substantially better than for the method based on voltage sampling in a fraction of the AC period time.

Discussion
The requirement to keep voltage inside narrow boundaries over time has grown into an actual obligation during the last ten years. The need for fast voltage correction in distribution lines and other important locations in electric grids has become more and more tangible. The widespread fast-changing loads and stochastically generating plants produce a significant demand for finding appropriate and efficient solutions for preventing voltage deviations. The inevitable part of any control system aiming to keep a constant voltage level is the entity able to estimate the voltage RMS during a short time. The existing methods and means as a rule provide such a measurement during relatively long times, including many AC periods. The authors were motivated to find and analyze methods of RMS assessment in a time shorter than half the AC cycle duration. The main reason for such a task is the technical request of some sensitive consumers to ensure voltage constancy in each AC cycle.
The three most affordable approaches were studied in the proposed work. The first method is based on the RMS relation with the amplitude of a sinusoidal signal. Two other solutions were developed by the authors. The second method uses a restricted sampling time of voltage magnitudes in the fraction of the AC period with the application of a known RMS expression. However, this should be corrected by a special coefficient suggested in the work. The third approach is based on the decomposition of the voltage signal with the first n-odd harmonics. The well-known method of Fourier series representation can be applied. However, it is relatively heavy and less accurate compared with that developed in this work. The novelty of the submitted approach is in the description of a periodic (sinusoidal) signal by a set of harmonics that fits the obtained voltage points by the least-mean-square algorithm. This is based on solving the matrix equations. Such an approach prevents the need of a finding Fourier coefficient by integral calculations and in this way eliminates the requirements for applying strong computational efforts.
This investigation explored the accuracy of all analyzed approaches. The best accuracy was found to be in the novel method based on a signal decomposition. The error of the RMS estimation can be diminished up to 0.2-0.3%. However, this method requires significant computational power, which can complicate the development of a control system. A more convenient method can be developed by sampling voltage magnitudes during a fraction of the AC cycle (from 1/4 to 1/2 of a period) and applying a correcting coefficient depending on the sampling time. Its accuracy can be characterized by the relative error of 0.4-0.6%. Such accuracy is quite acceptable in most industrial applications. Altogether, it is worth emphasizing the simplicity of the equipment used to estimate the voltage RMS.

Conclusions
The present work is dedicated to finding a suitable solution for the AC voltage RMS assessment in a short time and with appropriate accuracy. The authors analyzed three affordable methods, two of which they developed. The most applicable approach is based on sampling voltage magnitudes during a fraction of the AC period and an applying a correcting coefficient depending on the time of the voltage measurement. This method can ensure a short time of the RMS estimation (less than half of the AC cycle) with an accuracy of 0.4-0.6%. Such estimation quality is acceptable enough for most modern electrical and electronic facilities.