FUNDAMENTAL HARMONIC MEASUREMENT IN PRESENCE OF GAUSSIAN FREQUENCY DEVIATION USING 2-BIT FLASH A / D CONVERTER

Original scientific paper The paper proposes a novel approach to the measurement of the power grid voltage and/or current fundamental harmonic, using stochastic digital measurement method (SDMM) and 2-bit flash A/D converters. The power grid frequency variation in the European interconnection has been found as Gaussian. The influence of the frequency disturbance on the results of fundamental harmonic measurements is examined in detail. As theoretical analyses are extremely complex due to a high nonlinearity and stochastic nature of the problem, simulation analysis is employed as the primary method for fast testing and confirmation of the paper hypothesis. The results of realistic simulations give the measurement uncertainties below 0,01 % and 0,013 %, for the measured grid voltage and current, respectively. Experimental validation has been carried out by comparison of the commercial instrument measurements and the measurements of SDMM based prototype instrument. It has been found that results are in accordance.


Introduction
Voltages and currents in the modern smart grids and in the European Interconnection are increasingly nonsinusoidal, due to the use of power electronic converters, on both consumption and local generation sides.Accurate measurements of voltage and/or current fundamental harmonic in such non-sinusoidal regimes are important, because they define the fundamental components of active and reactive electrical power and energy, which are the subject of contracts and delivery [1].The fundamental harmonics of voltage and current are also crucial for defining the total harmonic distortion (THD) factor of power delivery and consumption, respectively.
Vast majority of methods and instruments assume the period of exactly 20 ms and hence measurements of harmonics within modern power grids are very accurate when the mains frequency is precisely 50 Hz.However, the accuracy is compromised when the frequency varies [2], which is the common occurrence in the European Interconnection [3].In such a case, pseudo-harmonics are measured instead of real ones [4].Conditions for detection of genuine mains voltage/current harmonics during frequency variations, as well as an algorithm for their calculation, are given in [4].
An overview of modern algorithms for harmonic estimation in presence of wide frequency variation is given in [5].All of them are of filter type and require the usage of floating point numeric processor, high resolution A/D converters and microprocessor of great processing power in order to execute these algorithms in real time.
Amongst other things, advances in modern electronic components technology have given us simple, reliable and extremely fast 2-bit flash A/D converters.They have been introduced in applications of stochastic digital measurement method (SDMM) [6,7] for precise and accurate measurements.The key feature is the simplification of addition, subtraction, multiplication and integration (accumulation) of signals [8,9], which is especially beneficial for measurements in frequency domain.Regardless of the resolution of base functions, the mathematical operations are reduced to addition, subtraction and accumulation, performed in integer arithmetic [7].In other words, the most complex operation -digital multiplication -is completely eliminated.Consequently, the hardware is hundreds of times simpler, more robust and extremely fast.Thus SDMM-based measurements have significantly wider bandwidth, which is increasingly important due to usage of fast-switching power electronics converters in the grid.
A novel SDMM-based instrument for measurement of fundamental voltage and/or current harmonic in presence of frequency variation is proposed in this paper.Its accuracy and precision are validated by realistic simulations, in which the frequency of input signal is changed in the same manner as in the grid, determined over the 7-day period.

Problem statement
In order to determine the frequency variations in the mains, it was measured every second, during 1-week period [8] in the University Campus in Novi Sad.Fig. 1 depicts the distribution of occurrence for measured 604,800 data.
The exact deviation of an empirically obtained distribution from the Gaussian distribution can be determined on the basis of the third and fourth central moment of the empirical distribution -M 3 and M 4 respectively.The third central moment of the distribution shown in Fig. 1 is: .Hz 10 435 1 ) ( 1 The third central moment is expressed in the standardized form is: The fourth central moment of distribution in Fig. 1 or expressed in standardized form: If the distribution is Gaussian, the third central moment 3 µ , which is a measure of the asymmetry of distribution function relative to the mean value, should converge to zero.In this case, Fig. 1 shows that the distribution curve is slightly shifted to the left, indicated by the "minus" sign in the Eq. ( 2).The fourth central moment 4 µ which is a measure of distribution function kurtosis, should converge to value 3,5 in the case of Gaussian distribution.In this case, a value of the fourth central moment (4) is to some extent greater than 3,5, which indicates that the distribution function is slightly stretched along the vertical axis.Deviations from the nominal values of the third and fourth central moment are not significant, so the resulting mains frequency variations distribution function (Fig. 1) can be treated as Gaussian.To summarize, the frequency distribution is of Gaussian type with the mean of 49,9941 Hz and standard deviation σ of 0,0204 Hz.The mean value of the absolute frequency disturbance is 0,016 Hz.As it is less than 0,02 Hz, the detection of harmonics up to 50 th in the power grid [4,10] is possible.It is possible to measure the fundamental harmonic even when frequency of a single period varies up to 1 Hz [4].
As the above frequency measurements are done over 1-second intervals, it is necessary to estimate the frequency variations on the 20 ms period level.If we assume that frequency variation on period level is also Gaussian, then, based on the Central Limit Theorem and the Sampling Theory, its standard deviation (σ) should be 0,144 Hz, i.e.50 =7,071 times greater than the 1- second σ.Variation of 6σ (0,864 Hz) includes more than 99,999999999 % grid periods in which frequency disturbance is less than 1 Hz, allowing accurate measurement of the fundamental harmonic [4].
The above supports the hypothesis of this paper: it is possible to accurately and precisely measure the fundamental harmonic using SDMM and 2-bit flash A/D converter.In SDMM approach, the high number of samples is crucial for measurement accuracy [8], achieved by faster sampling and/or longer measurement interval.European norm EN50160 [10] stipulates that harmonics are measured over 600 s time interval, which is used in the following simulation analyses.Every simulated measurement is executed on 20 ms basis, and the final result is calculated as the mean value of 30 000 individual measurement results.
3 Stochastic digital measurement method -SDMM SDMM represents "measurement over an interval" method [8].One of the key characteristics of this method is application of low resolution fast A/D converters -in the extreme case 2-bit A/D converters.In case of low resolution A/D converters, quantization error is significant.This error cannot be eliminated in full, but it can be considerably reduced using dithering method.It involves adding up an input signal with a dither signal within range of ±Δ/2, where Δ is quantum of applied A/D converter.The dither signals are:   In each clock cycle of primary oscillator the A/D conversion of the input signal is performed.The results of this conversion are digital outputs Ψ 1 and Ψ 2 .The values of Ψ 1 and Ψ 2 are in the set {−1, 0, 1}.Further on, Ψ 1 and Ψ 2 are multiplied and the product Ψ has a value that is in the same set of values {−1, 0, 1}.The last block shown in Fig. 2 is the accumulator which, in the case of 2-bit A/D conversion, is simple "up-down" counter.After completion of the measurement interval, the contents of the accumulator are proportional to the measured signal with the scale factor N, where N is the total number of samples in the measurement interval.
This instrument can be used to measure the product of two signals y 1 and y 2 that may represent different quantities (e.g.current and voltage, for power and/or energy measurement), or, if the inputs of both A/D converters are fed with the same signal, the measurement result will be proportional to the input signal RMS value Parameter <Acc> represents the contents of the accumulator at the end of the measurement interval, N is the total number of samples in the measurement interval, and Δ represents a quantum of applied flash A/D converter.
Another very important application of this device, which is crucial for this proposal, is the measurement of individual harmonics of a complex periodic (nonsinusoidal) signal.If the input of the first A/D converter is fed with the signal y 1 (e.g.mains voltage or current containing higher harmonics), and the input of the second A/D converter is fed with dithered base signal y 2 from an orthonormalized set (e.g.Fourier), the measurement result will be the value of one Fourier coefficient (cosine or sine, depending on the applied base functions).
Since the input of the second A/D converter is the dithered base function specified in advance, it is possible to completely replace the second input with preset samples stored in one memory block.The only requirement in this regard is that dithered base functions samples in memory are at least of 2 bits higher resolution than the resolution of the first A/D converter [11].A block diagram of the described circuit is shown in Fig. 3.
<Acc1> and <Acc2> represent contents of first and second accumulator at the end of measurement intervalrespectively, N is the total number of samples in the measurement interval and Δ represents quantum of used flesh A/D converter.
RMS value of n th harmonic U n is calculated using following formula:

Simulation analysis of the problem
Due to high nonlinearity of the instrument (caused by truncation of 2-bit A/D converter) and stochastic nature of the problem (caused by Gaussian frequency disturbance and use of SDMM), a theoretical approach to the problem analysis is extremely complex.Therefore a simulation analysis is adopted as the suitable method for quick and reliable testing of the paper hypothesis.   2 Acc a N Fundamental harmonic RMS value

The impact of base functions resolution on measurement uncertainty -theoretical consideration
The complete derivation of formula for SDMM method measurement uncertainty is presented in [11].For this proposal only one part of that derivation is of interest, the part dealing with measurement uncertainty of harmonics measurement using SDMM in case when input signal samples and samples of base function are of different resolution.
In every sampled instant of time, there is an error, which stems from the digitized nature of the instrument (Fig. 2) and is defined as the difference of the multiplier output and the product of the two actual signals: Therefore the variance of the average error is: where N is number of samples in measurement interval (t 2 − t 1 ), while the stochastic variance σ s is determined by the quantum of applied A/D converters (Δ) and the norm of the two internal signals [11]: . 16 The above expression (Eq.( 11)) is valid in case when both A/D converters from Fig. 2 are of the same resolution (Δ 1 = Δ 2 = Δ).However, if the instrument is to measure harmonic components by storing precalculated dithered base functions in memory (Fig. 3), it is possible to have the memorized function in a higher resolution and to sample the actual signal y 1 in a somewhat lower resolution, so Δ 1 ≠ Δ 2 .Hence quantum values are now of different size, Eq. ( 11) becomes: . 16 It is obtained that the absolute variance of the average error is: To maximize the measurement result, it is necessary to utilize the full range R for the memorized base functions, so the square norm is: Combining ( 15) and ( 16), we obtain the variance of the average measurement error for individual measured harmonic components (sine or cosine Fourier coefficient): The use of high-resolution base functions results in drastic reduction of measurement uncertainty which is, in case of SDMM, defined by standard deviation (i.e.variance of the average measurement error, given in (17)) of individual Fourier coefficients.Furthermore, standard deviation decays with factor N , where N is total number of samples in measurement interval (t 2 − t 1 ).

Simulation parameters
For simulation analyses two signal waveforms are chosen: triangular (with THD of 12 %) corresponds to grid voltage and saw-tooth (with THD of 81 %) corresponds to mains current.Analytical expressions for distorted voltage and current are given by ( 18) and ( 19), respectively: Fig. 5 depicts a waveform of simulated voltage signal presented with Eq. 9.This signal contains first 15 odd harmonics and it is almost triangular in its shape.For the better perspective Fig. 6 represents the enlarged area from Fig. 5, around 20 ms point, where "zero crossing" should take place in case the frequency of signal is exactly 50 Hz.From Fig. 6 can be seen that "zero crossing" point is slightly shifted, denoted by ΔT, which is caused by mains frequency variation Δf.
In the same manner, Fig. 7 is a graphical presentation of simulated current signal, given by Eq. 10.The waveform of this signal is close to a saw-tooth shape.The enlarged area around 20 ms point (Fig. 8), shows that "zero crossing" point is shifted, denoted by ΔT, due to mains frequency variation Δf.A bespoke simulation software for fundamental harmonic measurement, incorporating Gaussian frequency variations from the real grid (as discussed in section 2), has been developed.Sampling frequency is set on 100 kHz and the measurement interval is 600 s, aligned with [10].The average frequency is set to 50 Hz and its standard deviation is simulated to be 0,05 Hz, 0,1 Hz or 0,144 Hz.The values of amplitude for both voltage (triangle) and current (saw-tooth) signals are 4 V and 4 A, respectively.
Even when the simulation parameters are unchanged, every simulation run is slightly different due to stochastic nature of both dither signal h 1 and input signal frequency in each 20-ms period.However, averaging over 30 000 cycles should eliminate both stochastic effects onto the accuracy.To prove this, and to investigate repeatability, 30 simulations are performed for each setup.

Simulation results
Simulation results for voltage and current fundamental harmonic measurements are shown in Tab. 2 and Tab. 3, respectively.The first column of both tables represents the average value of frequency variation, f ∆ (Hz), which changes according to the Gaussian function within the 600 s measurement interval.The second column shows the preset (accurate) RMS value of the fundamental harmonic, 1RMS Y , whereas the third column shows the measured RMS value of the fundamental harmonic, 1RMS m Y .The fourth column in the tables gives the standard deviation of 30 simulations, σ, and the fifth column shows the method's standard measurement uncertainty, u, expressed as a percentage of the measured value.

Experimental validation
For the purposes of fast experimental validation of the method, a simple prototype of a single-channel instrument is designed.The instrument consists of two parts.Major components of the first part are: a 2-bit flash A/D converter, LFSR based generator of random dither signal, analog adder, 5V reference voltage source, and a serial communication interface.Multiplication of 2-bit samples of the input signal with basic functions samples, accumulation and higher order calculations were performed on the PC, which is connected to the measuring circuit using serial interface.Sampling frequency of the instrument is 100 kHz.Fig. 11 presents the first part of the prototype instrument.
A current signal from one of the phases in the distribution substation in Novi Sad is selected for the purposes of testing.Measurements were carried out simultaneously with the aforementioned prototype and commercial three-phase power analyser with declared accuracy of ±0,2 % for the current range.A Rogowski coil was used as a measuring transducer for both instruments, as shown in Fig. 12.
As the proof of concept, two 10-minute measurements were taken using two instruments based on different measurement methods.The results of those measurements are sufficient to compare the performances of the SDMM based instrument against the commercial power analyser.The first 15 harmonics of the current are measured using commercial power analyser and those were used in the further analyses as the referent measurements (benchmark).Tab. 4 shows the measurement results of current fundamental harmonics.First column in the table shows the time interval of the measurement.Second column denoted as I 1c represents the amplitude of the current fundamental harmonic, measured using commercial power analyser.The third column, I 1p , represents the amplitude of the current fundamental harmonic measured using SDMM instrument prototype.The last column in the table, denoted as e, shows the relative error of the prototype instrument measurement in regard to the value of fundamental harmonic measured using commercial instrument.Error is calculated according to Eq. 20.

Further possibilities -discussion
Modern electronic technology allows even higher sampling frequencies than simulated 100 kHz.Therefore, the same simulations have been executed with 5 times greater sampling frequency (500 kHz), for the saw-tooth waveform and frequency variation of 0,144 Hz only.Achieved results agree with the theoretical reduction of measurement uncertainty by the factor of 5 [6÷9, 12] - the standard deviation of 30 measurement results is 1,42×10 −4 and uncertainty is 0,0067 % of the measured value.
Hardware implementation of an instrument block from Fig. 4 is extremely simple.Single FPGA can allow 350 such blocks (for 50 harmonics of 4 grid currents and 3 phase voltages) to operate at 500 kHz sampling rate.Furthermore, a bespoke mixed-mode ASIC chip can accommodate 8 such three-phase sets running at 10 MHz sampling, which would yield approximately 10 times greater precision and accuracy than those in Tab. 2 and Tab. 3.
The results of experimental validation (Tab.4) show fine matching of the commercial instrument measurements and the measurements taken using instrument based on SDMM method.
When the power grid voltage and current harmonics are accurately measured, it is possible to derive complete information on any quantity in power grid [12] -voltage RMS, current RMS, THD of voltage, THD of current, active, reactive and apparent power and energy, etc.

Conclusion
The paper confirms the viability of SDMM approach in combination with 2-bit flash A/D converters for accurate measurement of fundamental voltage/current harmonic even in presence of sizeable (7 times greater than measured) Gaussian frequency variations.
Simulated measurement results for the fundamental RMS of a triangular (THD = 12 %) and a saw-tooth signal (THD = 81 %) give the measurement uncertainty below 0,01 % and 0,013 %, respectively, even at moderate 100 kHz sampling rate.This implies that the proposed approach could be utilized for measurement of higher harmonics as well.
The proposed simple hardware operates in integer arithmetic, with addition, subtraction and accumulation as the only operations.Thus processing of huge number of samples is easily executed in real time, allowing very high sampling rates and consequently wide frequency range of the instrument.The follow-up microprocessor of modest processing power and speed is sufficient to extract the accumulated values for further high-level calculations.
Integration of proposed hardware into a mixed-mode ASIC chip running at 100 times greater (10 MHz) sampling rate allows up to 100 10 = times better performance, which is very encouraging.
Experimental validation has been carried out by comparison of the commercial instrument measurements and the measurements of SDMM based prototype instrument.It has been found that results are in agreement.However, it should be noted that the results of the experiment are only a proof of concept that it is possible to accurately measure the fundamental harmonic of the power grid signal using 2-bit resolution A/D converter.Consequently, the research should be continued, a standalone instrument should be fabricated and tested on live power grid.

Figure 1
Figure 1 Distribution of occurrence of average 1-second mains frequency, measured in the European Interconnection over one week.

Fig. 2
Fig. 2 shows block diagram of the instrument (based on SDMM) for measuring the mean square value of the product of two signals.• y 1 and y 2 are input signals whose product is measured;

Figure 2
Figure 2 Block diagram of the instrument for measuring the mean square value of the product of two signals.

Figure 3
Figure 3 Block diagram of a circuit for one Fourier coefficient measurement of n th harmonic of an input complex periodic signal In order to measure the value of the n th harmonic two identical blocks shown in Fig. 3 are required, the first block to determine cosine Fourier coefficients a n , and the other to determine the sine Fourier coefficients b n .

4. 1
Instrument structure and simulated signals A schematic of simulated measurement device is displayed in Fig. 4. The dither signal h 1 is superimposed onto the input y, in order to suppress the systematic quantization error of the coarse 2-bit A/D converter [6÷9, 12].As discussed in section 3, base functions samples are prestored in a memory block in the form of 64-bit integers.The follow-up Multiplier 1 and Accumulator 1 are used for cosine coefficient calculation and Multiplier 2 and Accumulator 2 for sine coefficient calculation.

Figure 4
Figure 4 Schematic of an instrument for voltage or current fundamental harmonic measurement

Figure 9 Figure 10
Figure 9 Simulation results of current fundamental harmonic measurements (blue diamonds represent measured values and black lines standard deviation limits)

Figure 11 AFigure 12
Figure 11 A top view of the prototype instrument circuit board

Figure 13
Figure 13 Spectrum of current signal for the first 10-minute period, measured using commercial power analyser

Figure 14
Figure 14 Spectrum of current signal for the second 10-minute period, measured using commercial power analyser

Table 1
The interpretation of used notation

Table 2
Simulation results of current fundamental harmonic measurements (saw-tooth waveform)

Table 3
Simulation results of voltage fundamental harmonic measurements (triangle waveform)

Table 4
Measurement results of current fundamental harmonic