Calibration system developed to the harmonic measurements with DFT techniques

For some services and product development is necessary more information about harmonics, such as the amount of distortion on each order, to a large frequency spectrum. The aim of this work is to describe the development system applied to harmonic measurement with traceability to the international system of units, trough DC voltage levels and the Discrete Fourier Transform algorithm (DFT). The system is a software developed in visual basic language, called DIGITHARM, used by a multimeter with a General Purpose Interface Bus (GPIB) to digitalize a signal with sampling rates up to 100k samples per second. The work consist a tool for the calibration services provided by the LABELO-PUCRS, and its results indicate the best capability (uncertainty) from its laboratory to harmonic measurements.


Introduction
The aim of this paper is to describe a system that was developed to measurement harmonic components trough the Discrete Fourier Transform (DFT), to be used in LABELO-PUCRS, a metrology laboratory located in the Catholic University of Rio Grande do Sul (PUCRS), in Brazil. According to [1] the degree that the presence of harmonics can be tolerated in a power system depends on the susceptibility of the load or power source. The less equipment sensitive to the presence of harmonics generally is the heating equipment (resistive load) for which the waveform is irrelevant. The most sensitive are those who, in its project, assume the existence of a sinusoidal supply, for example, the communication and data processing equipment. With the increasingly common use of electronic circuits with nonlinear components such as thyristors, switching power supplies, or even lamp ballasts, there are an increase the presence of harmonic signals in power grid [10]. To be able to analyze these signals, quantify and fix them or keeping in view the protection of equipment and facilities of its harmful effects, can be used harmonic meters, such as power quality analyzer. To have confidence in the measurement performed by any equipment, according to [2] is necessary to ensure that they are operating according to their technical specifications, which are calibrated with reference to a known standard, and that have no external influence to affecting its measurement accuracy. Besides the system development to measure harmonics contents, this work is intended to the calibration of harmonic components with traceability to a DC voltage values.

Developed system
The developed system is composed by a software, a digital multimeter manufacturing Agilent, 3458A model, a computer and a General Purpose Bus Inteface (GPIB). The software was developed in the visual basic language that is used with the multimeter in order to perform the configuration, communication, reading and processing of the data concerned. Data processing is performed based on the DFT that was possible to extract information such as the harmonic content, and the signal waveform. With the DFT application was obtained the information for the harmonics amplitude, traceable to a DC voltage standard reference. This paper includes a study of the measurement capability associated to the system.

The DFT
According to [3], if a data sequence has finite length, the representation of the DFT can be used. This representation is useful in digital computations and digital hardware implementations. According to [4], the DFT is widely used to study the spectrum signals and is determined numerically and with the aid of digital computer. Given the N signal samples in the time domain, denoted f (k), k = 0,1,2, ..., N-1, the DFT is given by a set of N signal samples in the frequency f k = F n e 2 Where: N: samples number k: sample index n: harmonic index According to [3], the DFT is an important way to decompose s sequence of finite length. The DFT transforms a sequence x (n) into another sequence X (k), and can be easily obtained from the discrete Fourier series when this is used to represent a periodic sequence. A periodic sequence can be expanded using the discrete Fourier series as in equation 1. From there, it's possible rewrite the equation 2 as equation 3.
where: N: samples number k: sample index n: harmonic index To facilitate the computation process, one can separate the real part and the imaginary part, to the programmer doesn't to need complex numbers in the DFT calculation routine. This simplification allows the use of real numbers to calculate both sides of the sum of both the real part and the imaginary part. The samples of the Fourier transform can provide an effective representation of discrete frequency for a signal of finite length in discrete time [12][13]. The decision about the use DFT without using the fast Fourier transform is because the measurement doesn't require high speed or immediate presentation of the results. Besides this, with the use of DFT is possible any analysis of the wave number of samples, which is advantageous for the application.

Materials and methods
The multimeter has adopted ability to perform scanning waveforms through its analog-digital converter freely programmable [16], which in turn has data communication through the IEEE 488.2 protocol, known as GPIB interface. The multimeter has a resolution of 16 bits for a sample of 100,000 samples per second and 18 bits for a sample of 50,000 samples per second as well as data transfer rates of 100Mbits/s. This multimeter provides scanning waveform [6] with sampling rates of the order of 10 nanoseconds, and with the possibility of variation of parameters necessary for correct sampling of the waveform to be analyzed. One of the main requirements for the correct calculation of the DFT is the accurate determination of the period in which the sampled signal is repeated. For this to occur satisfactorily, an algorithm was developed to detect the period of the input signal samples. Since it's to consider the input signal as unknown, assuming the user has no information about the fundamental frequency or the amplitude amount of harmonic signals, the proposed algorithm should be able to detect if there is a period full signal within the sampled window. The maximum number of samples is limited to 10000, and the maximum allowed to the internal memory multimeter is 10240. The developed algorithm calculates the sum of the squared error between a number "a" samples and the samples later, and electing as possible starting points and end points of the period in which the sum of squared errors are minimal. The equation 11 was used in the algorithm programming.
When k is incremented all the sample points are recorded.
As the input signal is unknown trough this method are possible points where the error is local minimum, but not the point where it starts or terminates one period of the input signal. For this reason, the algorithm is inserted a limiter to avoid false detections.

The DIGITHARM
The work is based on the results of work done by INMETRO calibration laboratories, as well as work by other national metrology institutes, presented in journals or publications in the field of metrology, [7], [8] and [9]. The program was called DIGITHARM, and its initial screen (figure 1) allows the user to view their basic commands, as well as the results of sampling, and the waveform of the sampled signal. On this screen the user can also make settings such as measuring range and change the GPIB address. The figure 2 shows the DIGITHARM advanced settings screen, where is possible inform the sampling rate required, the number of samples applied to the signal to be measured, and the name of the data files that are saved. Its main settings that are interactive for the user are the sampling rate, the samples number, and the measuring range of the multimeter.

Figure 2. System configuration screen
The multimeter used allows scanning signals performing DC voltage measurements, by direct sampling or subsampling. The table 1 has the basic characteristics of each scanning methods. The signal to be measured must be repetitive, it was decided to set the multimeter to sub-sampling, which has a higher bandwidth and maximum sampling rate available. In sub-sampling, the multimeter performs one or more samples for each cycle for the input signal. With each successive period, the point where it's held the first sample is delayed a bit, and more samples are taken. After the number of periods occurs so as to be performed the number of samples set, the multimeter reorders the samples so as to form the waveform to be measured. The major advantage of this method is that samples the input signal can be effectively spaced at a minimum interval of 10 nanoseconds, compared to a minimum of 10 microseconds to sample the DCV method and 20 microseconds for direct sampling. This means that the sub-sampling can be used to digitize signals with frequency components up to 12MHz. The measures carried out by sub-sampling circuit using "track-andhold" multimeter that has an opening of 2 nanoseconds. The sub-sampling (sampling and direct) have less instability in triggering the scan by DCV method. The disadvantages of sub-sampling are the input signal must be regular and that the sub-sampling is not a measure in real time. As the input signal when the expected use of the system must be periodic and not need a real-time measure. Is important to register that these disadvantages don't cause any impact to the DIGITHARM design.

The uncertainty measurement
A measure isn't complete without the expression of its uncertainty. The methodology to calculate the measurement uncertainty was based on [11], from the equation 12 [12], where the contributions considered were factors from the multimeter, like its construction and settings, as well the measurement method.
• Reference standard resolution • Specification for voltage measurement [6] • ADC Quantization error (analog digital converter) [14] • Loading error (multimeter input capacitance) [6] • Quantization noise [14] • Bandwidth error [5] , [14]and [16] • Aperture time error [5] • DFT Quantization Standard Deviation [14] • DFT Jitter Error [14] e [6] The system validation was also considered in its capability measurement. For this, was adopted the waveforms with high distortion, mathematically defined, such as the square and sawtooth waveforms. The sawtooth waveform has amplitudes of harmonics, composed by 1 / n, where n is the harmonic index (with n = 1,2,3...n) for the odd and even numbers [15]. Similarly, is composed the harmonic amplitude of the square waveform, however, only for an odd number.
To the system validation was used numerical simulation and a function synthesizer, to generate two waveforms, square and sawtooth, with 5ns edge time. As results to the system measurements, the highest error found was about 0.024% and 0.025%, respectively, for square and sawtooth waveforms. Another step in this validation was taken by comparing the measurements from the system with the values from the equipment calibrated by INMETRO. In this case, the results obtained were lower than limits applied to uncertainty contributions considered by the system.

Results
The mainly result of this work is the DIGITHARM, that have uncertainty contributions were estimated for amplitudes at the beginning and the end of each measurement range, for 100Hz up to 100kHz (table 2). These values were calculated in reference to the fundamental amplitude and were linearized in order to obtain the Calibration and Measurement Capabilities (CMC) to the system. The DIGITHARM provided an 11013-p.3 opportunity to LABELO-PUCRS for harmonics calibration, through the traceability to the international system of units (SI) that was established by DC voltage measurements obtained from multimeter calibration. Also, it's possible to attend compliance demands as harmonic measures for the entire audio range.

Conclusion
The DIGITHARM is a tool for expanding the scope of services provided by LABELO-PUCRS for its metrology services. Its uncertainty levels are sufficiently low to attend the Brazilian industrial demand, but they are about ten times greater than the uncertainty obtained by measurement systems such as INMETRO or PTB. These values are in order to 0.0040% for INMETRO and 0.040% for LABELO. The main difference between those is that the INMETRO [15] and PTB [7] systems are optimized for frequencies close to 60Hz, which the multimeter configurations have lower error bounds, but that limits its bandwidth. The DIGITHARM is applied to a broader frequency spectrum than INMETRO [15] and PTB [7], with harmonic measurements up to 100kHz. For this, others multimeter configurations were considered, which made its measurement uncertainty bigger than INMETRO and PTB, but taking the advantage of measurement in a wider frequency range, that enable acoustic applications, besides harmonics measurements.