Measuring Active Power as the Difference between the Peak Value of Instantaneous Power and the Apparent Power

The traditional approach to calculate the active and reactive power in AC power systems requires the measurement of the phase shift between the voltage and current for the evaluation of the power factor. To do this, power analyzers can implement several methods. In principle, it is always necessary to identify specific points of waveforms (e.g., using a zero-crossing detection technique) and get their time shift. In a similar way, the frequency value must be evaluated in order to calculate the angular frequency. Unfortunately, this kind of common method exhibits some issues, such as the large sensitivity to noise. Moreover, inaccuracies in the evaluation of the power factor have a big impact on the final estimation of the electric power. This paper presents a simple but effective way to calculate the electric power, overcoming the need for a direct measurement of the phase shift and frequency. In particular, it is shown that the active power can be easily calculated as the difference between the peak value of the instantaneous power and apparent power. The reactive power and power factor are evaluated by exploiting the same quantities. The practical implementation of the proposed formulation in power analyzers guarantees several benefits without reducing accuracy.


Background
Power metering is crucial in modern electric systems. The optimal management of AC grids requires the accurate estimation of active power. This is especially true in the case of bidirectional power flows for smart grids where renewable power plants, loads, and storage systems are present at the same time [1][2][3]. Power metering also plays a key role in many other fields, such as power converters, electrical machines, drive systems, electromagnetic compatibility, energy saving, etc. [4][5][6][7].
A wide number of devices designed for measuring active power are available on the market. Some reviews about mainstream measurement technologies are in [1,4,8].
In [8], the authors present a detailed survey on the existing types of power and energy measurement devices while also considering traditional technologies such as electrodynamo wattmeters, thermal wattmeters, induction-type energy meters, and so on. The working principles of these devices and their typical applications are discussed in order to highlight their merits and drawbacks.
Nowadays, electronic power analyzers integrate many functions, providing the measurement of active and reactive power, power factor, THD, etc. They are suitable for steady-state, as well as for transient, conditions. These systems acquire simultaneous samples of voltage and current waveforms, digitize these values, and carry out arithmetic multiplication and averaging using digital techniques to obtain the power measurement [4]. The high-speed acquisition of voltage and current using modern analog-to-digital converters, along with powerful elaboration devices, makes digital analyzers the dominant technology for power metering. This work refers to such systems. To evaluate the active power, a standard electronic wattmeter calculates both the rms value of voltage and current and the power factor. Focusing on the latter, the traditional approach consists of the evaluation of the phase shift between the voltage and current waveforms. This implies the necessity to directly measure the time shift between the voltage and current waveforms. In principle, it is necessary to detect specific points of waveforms (e.g., using a trigger or a zero-crossing detection technique) and get the period between such points [9,10]. It is also required knowledge of the actual value of the frequency, especially if some variations were expected to take place. The presence of noise or distorted waves could imply a significant error in final estimation for all the applications requiring a precise synchronization [9,11,12].
With the purpose to overcome the need for a direct measurement of phase shift and frequency, this paper presents an alternative way for the evaluation of active power. In particular, this work proves that active power can be expressed as the difference between the peak value of instantaneous power and the apparent power. The reactive power and power factor are calculated by exploiting the same quantities.
In comparison to the traditional approach, the new one is simpler in terms of practical implementation, especially when the voltage and current are pure sine waves. Moreover, in most cases, accuracy is very high even in the presence of noise or distorted waves. Section 2 reports the main relationships representing the core of this work. Section 3 provides the analytical proof of the new formulation. In Section 4, validation is discussed, with additional information about measurement errors, three-phase systems, and harmonic disturbances. Section 5 lists the main advantages of the proposed method.
All the results reported in this paper do not take into account the presence of harmonics in voltage and current waveforms, except for Section 4.3, which provides some brief information about harmonic distortion. A comprehensive analysis about the calculation of electric power in the case of harmonics is out of the scope of this work.
Although this study deals with AC electric systems, it is worth noting that there are other possible fields of application, for example, mechanical vibrations, complex analysis, and so on.

Introducing the New Method for Measuring Electric Power
For the sake of simplicity and clarity, this section refers to a single-phase electric circuit in a steady-state condition.
The core of this paper consists of the following three equations: where ϕ is the phase difference between the voltage and current, cosϕ is the power factor, P is the active power, Q is the reactive power, S is the apparent power and p M is the peak value of the instantaneous power. The main result is the calculation of the active power P in Equation (2) as the difference between the peak value of the instantaneous power p M and the value of the apparent power S. In this way, no physical measurement of frequency or phase shift is required because the evaluation of the power factor becomes unnecessary for the determination of the active power. At the same time, the calculation of the power factor and reactive power in the new approach comes from the peak value of the instantaneous power.
We note that in Equation (3), the reactive power Q is an absolute value since it is expressed as a square root. Alternatively, for the range ϕ ∈ [0, π], one can calculate ϕ from the power factor in Equation (1) and then calculate Q using sinϕ.
From a practical point of view, in comparison to the traditional measurement process, the proposed formulation provides a simpler way to get the electric power, as highlighted by the flow chart in Figure 1.
lighted by the flow chart in Figure 1.
The main advantage is the opportunity to avoid the direct measurement of the time interval tφ and of the frequency f, which are required in the traditional formulation to evaluate cosφ, as follows: where ω is the angular frequency. This means that common algorithms used by power analyzers, scopes, etc. for measuring phase shift could be no longer required, especially when the final target is the evaluation of the active or reactive power. At the same time, the issues linked to traditional algorithms become irrelevant. An example is the uncertainty in zero-crossing detection in the case of noise superimposed to the voltage or current waveform. This uncertainty can cause a significant error in the evaluation of the phase shift and, consequently, in the final value of the active power. On the contrary, the new method does not require any zero-crossing.
Measurement of voltage and current peak values can be carried out using one of the common methods in the literature. The calculation of rms values is immediate in the case of pure sine waves, and so it is easy to get the value of S.
More details about the advantages of the proposed approach are discussed in Section 5. The main advantage is the opportunity to avoid the direct measurement of the time interval t ϕ and of the frequency f, which are required in the traditional formulation to evaluate cosϕ, as follows: where ω is the angular frequency. This means that common algorithms used by power analyzers, scopes, etc. for measuring phase shift could be no longer required, especially when the final target is the evaluation of the active or reactive power.
At the same time, the issues linked to traditional algorithms become irrelevant. An example is the uncertainty in zero-crossing detection in the case of noise superimposed to the voltage or current waveform. This uncertainty can cause a significant error in the evaluation of the phase shift and, consequently, in the final value of the active power. On the contrary, the new method does not require any zero-crossing.
Measurement of voltage and current peak values can be carried out using one of the common methods in the literature. The calculation of rms values is immediate in the case of pure sine waves, and so it is easy to get the value of S.
More details about the advantages of the proposed approach are discussed in Section 5.

Analytical Proof
Considering a standard single-phase electric circuit in a steady-state condition where the voltage and the current are pure sine waves, the phase difference between such signals is the angle ϕ: The basic equations in the time domain are: where V M and I M are the peak values of voltage and current, respectively. By definition, the instantaneous power is: thus: For the sake of example, Figure 2 shows voltage, current, and instantaneous power waveforms.

Analytical Proof
Considering a standard single-phase electric circuit in a steady-state condition where the voltage and the current are pure sine waves, the phase difference between such signals is the angle φ: The basic equations in the time domain are: where VM and IM are the peak values of voltage and current, respectively. By definition, the instantaneous power is: thus: For the sake of example, Figure 2 shows voltage, current, and instantaneous power waveforms. Using Werner formulas, Equation (8) since: Focusing on the peak value of the instantaneous power and searching for its analytical expression, it is necessary to calculate the time derivative of p(t) from Equation (9) and set such derivative equal to zero: Using Werner formulas, Equation (8) becomes: since: Focusing on the peak value of the instantaneous power and searching for its analytical expression, it is necessary to calculate the time derivative of p(t) from Equation (9) and set such derivative equal to zero: To identify the maximum points while excluding the minimum ones, the graph of p(t) and its time derivative can be useful, as seen in Figure 3. The argument of sine in Equation (11) is in the horizontal axis.  (11) To identify the maximum points while excluding the minimum ones, the graph of p(t) and its time derivative can be useful, as seen in Figure 3. The argument of sine in Equation (11) is in the horizontal axis. The time derivative of the instantaneous power in (11) is positive when: or: This is true in the range: Looking at Figure 3, the maximum point for the instantaneous power occurs at 2π or 0, and thus when the argument of the sine is: (15) Considering this point, a further confirmation comes from the calculation of the second derivative of the instantaneous power: that is negative: because, from Equation (15): The second derivative is negative, confirming the detection of the maximum point for the instantaneous power.
Coming back to Equation (9), the instantaneous power at the maximum point is expressed as: or:  (9) and (11).
The time derivative of the instantaneous power in (11) is positive when: or: This is true in the range: Looking at Figure 3, the maximum point for the instantaneous power occurs at 2π or 0, and thus when the argument of the sine is: Considering this point, a further confirmation comes from the calculation of the second derivative of the instantaneous power: that is negative: because, from Equation (15): The second derivative is negative, confirming the detection of the maximum point for the instantaneous power.
Coming back to Equation (9), the instantaneous power at the maximum point is expressed as: or: then the power factor cosϕ is: Peak values of voltage and current can be rewritten in terms of rms values, as follows: From a mathematical point of view, these relations are undefined in the case of zero value for V rms or I rms . Regardless, in this case, the electric power is null for certain, and no further calculations are necessary.
Finally, multiplying each term of Equation (24) by S and considering that the active power P is the product of S and cosϕ, the new formulation for the evaluation of the active power is obtained by: Thus, the active power can be easily calculated as the difference between the peak values of the instantaneous power and apparent power. The last equation suggests that the active power can be computed without measuring the phase shift and frequency.
From power triangle formula: the absolute value of the reactive power is easily obtained by the following: Alternatively, in the range ϕ ∈ [0, π], one can calculate ϕ from the power factor in Equation (24) and then calculate Q using sinϕ.
The final results remain the same in the case of voltage or current expressed in terms of sine, as in Equation (6). An analytical proof is in Appendix A.

Validation
It is easy to verify that the proposed formulas used to calculate the active and reactive power lead to the same values achieved by using traditional equations.
To validate this statement, readers can implement a simple code in Matlab environment as the one reported in the following, confirming the correctness of the proposed formulation. This example refers to a pure sine waves condition. Q_new = sqrt(pM*(2*S-pM)) % absolute value of reactive power calculation, new approach %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% The following sections report information about: • An analysis of measurement errors in the case of noise; • The implementation of the proposed method for three-phase systems; and • The implementation in the case of harmonic distortion.
The theoretical analysis for each of these cases can be easily confirmed by simulating different scenarios and comparing the results coming from the new method to the ones obtained with the standard approach.
In recent years, some experimental tests in different test benches have been carried out. To this aim, specific prototypal boards for the sensing and conditioning of signals have been developed to realize three-phase digital power meters for specific applications [13,14]. Control has been realized using different types of micro-controllers. In all scenarios, at different voltage amplitude, frequency, noise, harmonics, etc., the results confirm the validity of the theoretical analysis.
From a practical point of view, during laboratory activities, it has been observed that the proposed method can be easily implemented by programming commercial, low-cost micro-controllers. One of the main advantages consists in avoiding the use of any counter subroutine for the evaluation of the frequency or phase shift.

Error Analysis
In many operating conditions, the relative error of the proposed method is expected to be lower in comparison to the traditional approach for the following reasons.
The first reason deals with the number of elements whose relative error impacts the overall inaccuracy. Active power is commonly expressed as: P = V rms ·I rms · cos ϕ = V rms ·I rms · cos ω·t ϕ = V rms ·I rms · cos 2·π· f ·t ϕ Based on the rules for the propagation of uncertainties, the relative error ε P linked to the final value of P is proportional to the relative error caused by each element: where each term is the ratio between the absolute error ∆ and the value of the physical quantity: In the new approach, active power is calculated as in Equation (2): so that: where: In comparison to Equation (29), which is referred to the traditional formula, the number of relative error terms in Equation (32) is lower. In other words, the number of elements that would lead to inaccuracies are reduced.
In most real applications, the power factor is close to 1, or it is compensated in order to get high values for well-known reasons [15,16]. This means that the phase difference between the voltage and current is usually close to 0 or very low. In this case, the value of p M in Equation (33) is very high, leading to the opportunity to neglect its relative error in Equation (32).
A rigorous analysis of the measurement errors taking into account all possible scenarios, as well as the systematic and accidental errors, is out of the scope of this work. Regardless, from the qualitative analysis reported above, it is clear that the proposed method gives some benefits for accuracy. For the sake of example, Figure 4 shows voltage and instantaneous power in the presence of white Gaussian noise [17], where the signal-tonoise ratio is 30. Zoom windows highlight the issues encountered during the measurement process, assuming that the instrument adopts the first sample that reaches the zero value as the instant of the zero-cross of the waveform. In this numerical example, the rated values are:   This example confirms the effectiveness of the proposed approach for the final accuracy.

Three-Phase Systems
In a three-phase system, Equation (2) for the active power becomes: where the terms p M and S are referred to the phases a, b, and c. In a symmetrical and balanced three-phase system, a compact form is obtained as follows: where p M and S are again referred to a single phase. The power factor and reactive power are:

Harmonics
The increasing presence of renewable energy sources, storage systems, and power electronics devices into the grid causes a significant harmonic distortion in the current and voltage waveforms [18][19][20]. Modern power meters shall be able to measure the active power in the presence of harmonics.
The proposed method also remains valid in this case. Equation (2) has to be applied for each harmonic component h: The total power is the sum of the active power contributions from all the H harmonics: or: where V rms,t and I rms,t are the total rms values of voltage and current:

Discussion
Below is a summary of benefits and other information related to the method presented in this paper: • Active power is calculated in a straightforward way by exploiting the peak values of the instantaneous power and apparent power; • The presented approach is similar to the traditional one, but its practical implementation is simpler; • A direct measurement of the phase shift between signals (i.e., the direct measurement of their time delay) is no longer required; • A direct measurement of frequency is no longer required; • In the case of frequency or amplitude variations, the estimation of the active power is automatically updated after a brief settling time; • In comparison to the traditional procedure, the proposed method ensures the reduction of measurement errors thanks to the reduced number of elements impacting the overall inaccuracy and to the opportunity to neglect the relative error of p M in most cases, as described in Section 4.1; • It is easy to apply the same formulation to get the active power in three-phase electric systems, as well as in presence of harmonic distortion; • Taking into account the measurement of the reactive power at the grid level [18], the contribution of this work is a bit limited because Q is not calculated in a direct way since it depends on the preliminary assessment of P; • The proposed approach has general validity, and it can be extended for all cases in which it is relevant to analyze the correlation between two or more periodic signals having a time delay; and • Although this study deals with electric systems, there are other possible fields of application, for example, mechanical vibrations, complex analysis, and so on.
Future works will regard the extension of this study for the cases listed in the last points, including further investigation on the measurement of reactive power.

Patents
A utility model patent is pending.

Conflicts of Interest:
The authors declare no conflict of interest.

Appendix A
This appendix reports the equations representing the analytical proof of the proposed method in the case of voltage and current expressed as sine waves. Figure A1 shows the graph of p(t) and its time derivative. The argument of sine in Equation (A3) is in the horizontal axis.
It is worth noting that the final results are identical to the ones presented in Section 3.