Sampling Rate Impact on Electrical Power Measurements Based on Conservative Power Theory

: This article presents a study of the sampling rate effect on electrical power measurements whose deﬁnitions are based on the Conservative Power Theory (CPT). The deﬁnitions of active power and reactive power of the CPT were applied in the MATLAB ® software by varying the sampling rate and using a digital power meter as a reference. The measurements were performed in scenarios with linear and non-linear loads. Due to the usage of an integral in the CPT calculus, an error was veriﬁed associated with the reactive power being inversely proportional to the sampling rate. From the present study, it is possible to conclude that depending on the sample rate, the errors associated with the reactive power measurements are unacceptable and make the CPT implementation unfeasible. The results also presented effective information about the minimal sampling rate needed to make these errors neglected and to assist in choosing suitable microprocessors for the digital implementation of the CPT. It is worth mentioning that this paper was limited to assess how accurate the measurements of active and reactive powers were and important to highlight that the CPT has the additional contribution of dealing with distortion currents and consequently new portions of powers. For the latter, the inﬂuence of sampling rate may be crucial and new lines of investigation are motivated.


Introduction
The spread of non-linear loads in residential and industrial environments in recent years has had a considerable impact on electrical distribution grids since such loads cause harmonic distortions in current and/or voltage waveforms and imbalance in polyphase systems. Thus, the classical power theory, whose definitions apply exclusively to purely sinusoidal waveforms, has become inadequate to deal with the current and future scenarios. Therefore, modern power theories have been proposed with the purpose of correctly analyze linear and non-linear loads, as proposed by Budeanu [1], Fryze [1], Buchholz [2], Depenbrock [2], Akagi [3], and Tenti [4]. Although Budeanu and Fryze developed contributions to single-phase systems, they noticed power portions linked to harmonic components, making compensation difficult. Buchholz extended Fryze's theory to polyphase systems. From the works of Fryze and Buchholz, Depenbrock presented the first attempt to decompose current parcels in polyphase systems; however, their variables have no physical meaning. Akagi's theory is based on the Clarke transform and was developed for threephase systems in general. Such theory does not present a physical meaning to each portion of power or current; conversely, it can be very efficient to compensations with active power filters. The Conservative Power Theory (CPT) presented by Tenti, Matavelli, and Paredes [4], the focus of this work, proposes current decomposition in different quantities that contain specific physical meaning and can be applied to the obtainment of power and energy. This allows to correctly characterize loads and makes it possible to compensate the undesirable components of current.
reactive power with definitions based on CPT. The authors would like to highlight that this analysis is very important since it influences the choice of the most suitable microprocessor for the implementation of CPT. It is the first article in the literature that deals with the analysis of the sampling rate impact on the CPT measurements and, thus, its archival value.
This article is summarized as follows. In Section 2, the theoretical background of CPT is presented and the experimental arrangement is described. In Section 3, the obtained results are presented and discussed. Finally, Section 4 concludes the work.

Theoretical Background of CPT
CPT is called conservative, as it proves that even in non-sinusoidal conditions and in unbalanced polyphase systems, the terms of active power and reactive energy are conservative. Such theory defines its variables based on derivatives and integrals. The mathematical concepts used in the CPT are presented in sequence. To understand the definitions of CPT, some mathematical concepts defined under periodic hypothesis are made. Thus, operations are defined considering the period T, the fundamental frequency f, and the angular frequency ω. Table 1 presents a summary of the mathematical operations that define the main variables [4]. Mean value

Inner product
x, y = 1 If the inner product of the periodic quantities x(t) and y(t) is null, it can be said that such quantities are orthogonal as Equation (1): The properties of the impartial integral and the time derivative are presented through Equations (2)-(6): x,x = 0 (2) x,x = 0 (3) x,ŷ = − x, y x, y = − x,ŷ = − x,y

Power, Energy and Current Terms
The instantaneous values of voltage and current used in the calculations of power and energy are represented by u and i, respectively. Additionally, U represents the effective (RMS) value of voltage andÛ represents the RMS value of the impartial integral of voltage.
The single-phase instantaneous power is defined by the product between voltage and current as Equation (7): The single-phase reactive instantaneous energy is defined by the product between the impartial integral of voltage and current. It can be expressed by Equation (8): The average value of single-phase active power is represented by Equation (9), being defined by the inner product between voltage and current.
The average value of single-phase reactive energy is defined by the inner product between the impartial integral of voltage and current, as Equation (10): According to [4], the reactive power is only conservative in situations of constant frequency and sinusoidal voltages, because it is associated with the line frequency ω and the voltage total harmonic distortion THD(u).
According to [4], from the definitions of active power and reactive energy it is possible to decompose the current of a system with sinusoidal operation or not in different terms with physical meaning. Since the purpose of this article is limited to single-phase systems, the current decompositions will be restricted to this scenario.
The active current i a is the minimum current required for the supply of active power and is defined as Equation (12), where G e is the equivalent conductance.
The reactive current i r is the minimum current required for the supply of reactive energy and can be expressed by (13), where B e is the equivalent susceptance andÛ is the effective value of the impartial integral of voltage.
The residual current i v is obtained from the total current by subtracting the portions of active and reactive current according to (14). This component does not transfer active power or reactive energy.
Finally, considering the components orthogonality, Equation (15) is obtained from the effective current values:

Experimental Arrangement
With the aim of ascertaining the sampling rate effects, an experimental set consisting of linear and non-linear loads was constructed to verify the results in different scenarios. Thus, the system currents could be acquired at different sampling rates to perform power calculations based on CPT. Figure 1 represents the arrangement for data acquisition. The system effective supply voltage is 127 V, i.e., standard voltage at Brazil for single-phase loads. In the first scenario, only resistive loads are used in which the approximate value of each resistance is 138 Ω. The second scenario consists of an inductance with an approximate value of 20 mH which is series-connected with an array of resistive loads equivalent to those previously described. It is important to note that these values may vary mainly because of temperature variations and, thus, the importance of acquiring the loads' data to perform the analysis. A non-linear load is applied in the last scenario, where a semi-controlled rectifier is used. Thus, the system currents could be acquired at different sampling rates to perform power calculations based on CPT. Figure 1 represents the arrangement for data acquisition. The system effective supply voltage is 127 V, i.e., standard voltage at Brazil for single-phase loads. In the first scenario, only resistive loads are used in which the approximate value of each resistance is 138 Ω. The second scenario consists of an inductance with an approximate value of 20 mH which is series-connected with an array of resistive loads equivalent to those previously described. It is important to note that these values may vary mainly because of temperature variations and, thus, the importance of acquiring the loads' data to perform the analysis. A non-linear load is applied in the last scenario, where a semicontrolled rectifier is used.
It is important to emphasize that the model was evaluated experimentally, and the results were validated based on statistical analysis. This content will be discussed in Section 3. As a means to examine the interference of the sampling rate in the power calculus, the voltage and current samples were acquired from the oscilloscope, Agilent Technologies ® , DSO7034A model. Six cycles of voltage and current were sampled. For CSV acquiring format, sampling is limited to 1000 points, so approximately 167 samples per cycle were acquired, which corresponds to 10 kHz sampling rate. The number of samples per cycle was computationally increased using linear interpolation performed by the Repeating Sequence block in MATLAB/Simulink ® . Later, the high-frequency data were resampled at different frequencies to evaluate the power calculations in accordance with the CPT definitions.
As a reference comparison for the powers obtained from CPT, Yokogawa ® -WT230, a digital power meter, was adopted. It presents power basic accuracy of 0.2% of reading, with the frequency ranging from DC, 0.5 Hz to 100 kHz, and the accuracy is assured from 5 mA to 26 A. The Yokogawa meter acquired the voltage and the current signals simultaneously with 51 kHz and 16-bit resolution.

Scenario 1-Resistive Load
The first test was carried out with resistive loads that were parallelized to vary the drained power. To obtain a standard as a reference measurement, the voltage and current load samples, for each situation, were acquired through the abovementioned oscilloscope. In the same way, as described in Section 2.3, 167 samples were collected per cycle. Using It is important to emphasize that the model was evaluated experimentally, and the results were validated based on statistical analysis. This content will be discussed in Section 3.
As a means to examine the interference of the sampling rate in the power calculus, the voltage and current samples were acquired from the oscilloscope, Agilent Technologies ® , DSO7034A model. Six cycles of voltage and current were sampled. For CSV acquiring format, sampling is limited to 1000 points, so approximately 167 samples per cycle were acquired, which corresponds to 10 kHz sampling rate. The number of samples per cycle was computationally increased using linear interpolation performed by the Repeating Sequence block in MATLAB/Simulink ® . Later, the high-frequency data were resampled at different frequencies to evaluate the power calculations in accordance with the CPT definitions.
As a reference comparison for the powers obtained from CPT, Yokogawa ® -WT230, a digital power meter, was adopted. It presents power basic accuracy of 0.2% of reading, with the frequency ranging from DC, 0.5 Hz to 100 kHz, and the accuracy is assured from 5 mA to 26 A. The Yokogawa meter acquired the voltage and the current signals simultaneously with 51 kHz and 16-bit resolution.

Scenario 1-Resistive Load
The first test was carried out with resistive loads that were parallelized to vary the drained power. To obtain a standard as a reference measurement, the voltage and current load samples, for each situation, were acquired through the abovementioned oscilloscope. In the same way, as described in Section 2.3, 167 samples were collected per cycle. Using MATLAB/Simulink ® the number of samples per cycle was increased as previously addressed, and subsequently, the data were used in the power calculations based on the calculation method used by the Yokogawa ® meter [21], considering the harmonic spectrum up to the 15th order. It is worth mentioning that, for this scenario, the Fourier analysis demonstrated that the voltage harmonics, and consequently, the current harmonics are negligible. Therefore, the expected power values are shown in Table 2. The first table line indicates the use of a resistive load (R), and the subsequent lines indicate the usage of two (R/2) and three resistive loads (R/3) in parallel.  Table 3 shows the values of active power P and reactive power Q measured by the reference meter. Comparable with Table 2, the first line indicates the use of a resistive load, and the following lines show the respective use of two and three resistive loads in parallel. Table 3 also shows the mean power error regarding the reference meter in relation to the expected value, as well as the standard deviation of the error. Such values are used for the statistical analysis presented in Section 3.1.1. Comparing Tables 2 and 3, it is possible to observe that the maximum error of reactive power of the Yokogawa ® meter was 0.2 VAr, and with respect to the active power, the maximum error was-6.9 W. Tables 4 and 5 show the results of active and reactive power obtained from the CPT calculations performed in MATLAB ® . The first two lines of the tables indicate, respectively, the number of samples per cycle and the sampling frequency. Such as the previous tables, the first three lines indicate, respectively, the use of one, two, and three resistive loads in parallel. The last lines show the mean error of the CPT power in relation to the expected value, and the standard deviation of the error between the power of the CPT and the expected value.
The reactive power values approximate the measured and the expected references when the sampling rate is increased. The sampling rate significantly interferes with the calculation of Q due to the impartial integral. On the other hand, it appears that the values of active power are not influenced by the sampling rate.
The reactive power values approximate the measured and the expected references when the sampling rate is increased. The sampling rate significantly interferes with the calculation of Q due to the impartial integral. On the other hand, it appears that the values of active power are not influenced by the sampling rate. The convergence of reactive power can be visualized employing Figures 2-4, where the graphs of the values calculated by the CPT and the measured and expected references are presented.    The reactive power values approximate the measured and the expected references when the sampling rate is increased. The sampling rate significantly interferes with the calculation of Q due to the impartial integral. On the other hand, it appears that the values of active power are not influenced by the sampling rate. The convergence of reactive power can be visualized employing Figures 2-4, where the graphs of the values calculated by the CPT and the measured and expected references are presented.

Statistical Analysis-Resistive Load
With a view to compare the mean error of the CPT with the mean error of the reference meter, it was proposed to carry out a hypothesis test for all sampling frequencies.
For that, the null and alternative hypotheses presented in Equation (12) were tested.
corresponds to the mean error of the CPT and represents the mean error of the reference meter.
It is assumed that unknown populations are normally distributed with variances and unknown. Thus, the t-statistic is applied to test the hypotheses. First, it is necessary to test the equality of the population variances; therefore, the hypothesis test was performed according to (13) for all frequency conditions, assuming a significance level α of 5% [22].
The null hypothesis was rejected in most of the tests; consequently, it is assumed that the population variances are not equal, and the t-statistic is applied for this condition.
The calculation of t0 can be performed according to Equation (14) [22]. represents the sample mean of the CPT error and represents the sample mean of the reference meter error. ∆ is the difference between and , which is equal to zero. refers to the sample variance of the CPT error and refers to the sample variance of the reference power meter error. and are the number of samples referring to the CPT error and the reference meter error.
The degree of freedom can be calculated according to Equation (15): Adopting α equal to 5%, the critical region, and the acceptance region are obtained for the hypotheses defined in Equation (12). H0 is rejected if 0 > , where v is the degree of freedom. Table 6 presents the degrees of freedom, the rejection criteria, the t0 values

Statistical Analysis-Resistive Load
With a view to compare the mean error of the CPT with the mean error of the reference meter, it was proposed to carry out a hypothesis test for all sampling frequencies. For that, the null H 0 and alternative H 1 hypotheses presented in Equation (12) were tested. µ 1 corresponds to the mean error of the CPT and µ 2 represents the mean error of the reference meter.
It is assumed that unknown populations are normally distributed with variances σ 2 1 and σ 2 2 unknown. Thus, the t-statistic is applied to test the hypotheses. First, it is necessary to test the equality of the population variances; therefore, the hypothesis test was performed according to (13) for all frequency conditions, assuming a significance level α of 5% [22].
The null hypothesis was rejected in most of the tests; consequently, it is assumed that the population variances are not equal, and the t-statistic is applied for this condition.
The calculation of t 0 can be performed according to Equation (14) [22]. X 1 represents the sample mean of the CPT error and X 2 represents the sample mean of the reference meter error. ∆ 0 is the difference between µ 1 and µ 2 , which is equal to zero. S 2 1 refers to the sample variance of the CPT error and S 2 2 refers to the sample variance of the reference power meter error. n 1 and n 2 are the number of samples referring to the CPT error and the reference meter error.
The degree of freedom can be calculated according to Equation ( Adopting α equal to 5%, the critical region, and the acceptance region are obtained for the hypotheses defined in Equation (12). H 0 is rejected if t 0 > t α , where v is the degree of freedom. Table 6 presents the degrees of freedom, the H 0 rejection criteria, the t 0 values and the test conclusions for all frequency situations. The tests showed that with a 5% significance level, the mean error of active power calculated by the CPT via MATLAB ® Energies 2021, 14, 6285 9 of 19 cannot be considered greater than the mean error of the reference meter in all cases. For reactive power, the null hypothesis cannot be rejected only from 512 samples per cycle, meaning that below 256 samples per cycle, the mean error of the CPT is greater than the reference, with 5% of significance.

Scenario 2-Resistive-Inductive Load
Equal to the previous scenario, the test was carried out differing only by inserting a 20 mH inductance in series with the resistive loads. To obtain the power reference measurements, procedures identical to those described for scenario 1 were performed. The expected power values are shown in Table 7 and the measurements referring to the reference meter, as well as the mean error and the standard deviation of the error between the reference meter and the expected values, are shown in Table 8. Comparing Tables 7 and 8, one may verify that the maximum reactive power error of the meter was-0.9 VAr. Tables 9 and 10 show the results of active and reactive power calculated according to the CPT via MATLAB ® with varying sampling frequency. The values of mean error and the standard deviation of the CPT in relation to the expected values are also presented. It is noticed that similarly to the first scenario, the sampling rate has no influence on the results of active power and, it is proved that the calculated values of reactive power are close to the expected values with the increase of the sampling rate. The convergence of power as a function of the sampling rate is shown in Figures 5-7.

Statistical Analysis-Resistive-Inductive Load
For the resistive-inductive load, a procedure similar to that described in Section 3.1.1 was performed to test the hypotheses according to (12). Like scenario 1, an unknown population with normal distribution, unknown and unequal variances is assumed. Table 11 shows the degrees of freedom, the H 0 rejection criteria, the t 0 results, and the test conclusions for all sampling frequency conditions. It is noticed that similarly to the first scenario, the sampling rate has no influence on the results of active power and, it is proved that the calculated values of reactive powe are close to the expected values with the increase of the sampling rate. The convergenc of power as a function of the sampling rate is shown in Figures 5-7.

Statistical Analysis-Resistive-Inductive Load
For the resistive-inductive load, a procedure similar to that described in Section 3.1.1 was performed to test the hypotheses according to (12). Like scenario 1, an unknown population with normal distribution, unknown and unequal variances is assumed. Table 11 shows the degrees of freedom, the rejection criteria, the t0 results, and the test conclusions for all sampling frequency conditions.
The tests indicate that for the active power, the null hypothesis cannot be rejected in any frequency situation with a 5% significance level. It is also verified that the mean error of reactive power of the CPT is greater than the mean error of the reference meter for

Statistical Analysis-Resistive-Inductive Load
For the resistive-inductive load, a procedure similar to that described in Section 3.1.1 was performed to test the hypotheses according to (12). Like scenario 1, an unknown population with normal distribution, unknown and unequal variances is assumed. Table 11 shows the degrees of freedom, the rejection criteria, the t0 results, and the test conclusions for all sampling frequency conditions.
The tests indicate that for the active power, the null hypothesis cannot be rejected in any frequency situation with a 5% significance level. It is also verified that the mean error of reactive power of the CPT is greater than the mean error of the reference meter for   The tests indicate that for the active power, the null hypothesis cannot be rejected in any frequency situation with a 5% significance level. It is also verified that the mean error of reactive power of the CPT is greater than the mean error of the reference meter for sampling frequencies less than 122.88 kHz.

Scenario 3-Non-linear Load
For this scenario, the test was performed using a semi-controlled rectifier as a load supplying a resistive load at the output. The experiment was carried out by varying the firing angle and monitoring the active and reactive powers. To demonstrate the waveforms that feed the rectifier, Figure 8 depicts the voltage and current for a 90 • firing angle.

Scenario 3-Non-linear Load
For this scenario, the test was performed using a semi-controlled rectifier as a load supplying a resistive load at the output. The experiment was carried out by varying the firing angle and monitoring the active and reactive powers. To demonstrate the waveforms that feed the rectifier, Figure 8 depicts the voltage and current for a 90° firing angle.  Table 12 presents the results of the harmonic spectrum of the current corresponding to Figure 8. There is a phase lag of 29.8° in the fundamental current component. This means that although the load is not reactive, the firing angle causes the fundamental of current to lag in relation to the supply voltage.   Table 12 presents the results of the harmonic spectrum of the current corresponding to that although the load is not reactive, the firing angle causes the fundamental of current to lag in relation to the supply voltage. Similar to what was done in the previous scenarios, from the voltage and current signals, the values of the active and reactive powers were calculated by applying the power calculation method used by the Yokogawa ® meter in MATLAB/Simulink ® , considering harmonics up to the 15th order. The expected values for the non-linear load with different thyristor firing angles are shown in Table 13. As the distortions in the voltage waveform are negligible, it is concluded that the reactive energy will depend exclusively on the fundamental parts of voltage and current. Thus, to obtain a second reference measurement, it was decided to use a method common to low-cost meters, which does not deal with harmonic distortions in the voltage and current waveforms. These power calculations were performed by a specific block in MATLAB/Simulink ® . Table 14 shows the calculated values, as well as the mean error between the calculated and the expected values and the standard deviation of the error.  Tables 15 and 16 show the results of active and reactive power of the CPT obtained from MATLAB ® . The first lines of the tables indicate the number of samples per cycle and the sampling frequency. The lines in the first column indicate the firing angle of the rectifier thyristors. The mean error and the standard deviation of the error of the CPT in relation to the expected value are also presented. Due to the increase in the firing angle, the fundamental component of the current is lagged in relation to the voltage, which justifies the high values of reactive power even though the load is not reactive. Although it is not the purpose of the article, it is interesting to highlight the presence of reactive energy due to the non-linearity of the load, which justifies the usage of power theories capable of attributing physical meaning to the loads and dealing with voltage and current distortions. Tables 15 and 16 also confirm the great interference of the sampling rate in the calculation of reactive power.
The reactive power in relation to the number of samples per cycle for the non-linear load with firing angles of 0 • , 30 • , 60 • and 90 • are shown in Figure 9.  Statistical Analysis-Non-Linear Load The same process detailed in the previous scenarios was carried ou eses indicated in Equation (12). However, the mean error of the CPT wi the mean error of the calculated values with the fundamental compone represents the mean power error calculated by the CPT in relation to the and corresponds to the mean error calculated only with the fundam in relation to the expected values. The results of the hypothesis test for th are shown in Table 17.
Like the previous scenarios, the mean error values of the active pow ered equal regardless of the frequency. For the reactive power, with level, the hypothesis can be rejected for sampling frequencies below 1 sponding to 2048 samples per cycle.

Statistical Analysis-Non-Linear Load
The same process detailed in the previous scenarios was carried out for the hypotheses indicated in Equation (12). However, the mean error of the CPT will be compared to the mean error of the calculated values with the fundamental components. Therefore, µ 1 represents the mean power error calculated by the CPT in relation to the expected values, and µ 2 corresponds to the mean error calculated only with the fundamental components in relation to the expected values. The results of the hypothesis test for the non-linear load are shown in Table 17.
Like the previous scenarios, the mean error values of the active power can be considered equal regardless of the frequency. For the reactive power, with a 5% significance level, the hypothesis can be rejected for sampling frequencies below 122.88 kHz, corresponding to 2048 samples per cycle.