# A Nonlinear Calibration Method Based on Sinusoidal Excitation and DFT Transformation for High-Precision Power Analyzers

Authors: Wenjian Zhou; Sheng Yang; Li Wang; Hanmin Sheng; Yang Deng
Journal: Journal of Sensors
 (2021)

---

## Abstract

For most high-precision power analyzers, the measurement accuracy may be affected due to the nonlinear relationship between the input and output signal. Therefore, calibration before measurement is important to ensure accuracy. However, the traditional calibration methods usually have complicated structures, cumbersome calibration process, and difficult selection of calibration points, which is not suitable for situations with many measurement points. To solve these issues, a nonlinear calibration method based on sinusoidal excitation and DFT transformation is proposed in this paper. By obtaining the effective value data of the current sinusoidal excitation from the calibration source, the accurate calibration process can be done, and the calibration efficiency can be improved effectively. Firstly, through Fourier transform, the phase value at the initial moment of the fundamental frequency is calculated. Then, the mapping relationship between the sampling value and the theoretical calculation value is established according to the obtained theoretical discrete expression, and a cubic spline interpolation method is used to further reduce the calibration error. Simulations and experiments show that the calibration method presented in this paper achieves high calibration accuracy, and the results are compensation value after calibration with a deviation of±3×10−4.


---

## Body

## 1. Introduction

The calibration of a high-precision power analyzer is a key function in the signal measurement process. The calibration accuracy directly affects the accuracy and reliability of the subsequent measurement of voltage, current, power, harmonics, and other parameters [1]. There is a strict linear relationship between the input and output of ideal instrument, and no time lag or distortion exists. However, in the practical engineering scenario of power measurement, the relationship between input and output is always nonlinear due to the inherent and unchangeable characteristics of analog channel and sensor probe. In order to compensate or eliminate the nonlinearity of the instrument, the entire system needs to be nonlinearly calibrated; thus, the correctness of subsequent parameter calculations can be ensured [2–4]. The key to calibration is how to establish a mapping relationship between sampling theoretical values and actual values for each sampling point. This mapping relationship is essentially a mathematical relationship expression which needs to be designed and adjusted according to actual situation [5].Among the common calibration methods, the hardware compensation method is usually a method that uses both digital and analog circuits for compensation. Li [6] proposed an accurate online calibration system for current transformers, and the accuracy can reach 0.05 level. Luo [7] designed an improved calibration system based on direct current (DC) negative feedback for the calibration of current transformers. The calibration uncertainty of this system reaches 0.038% within the measuring range. The hardware compensation method circuit [8, 9] is usually complicated, and the circuit design process costs much. Besides, the calibration range is small, and the accuracy cannot be guaranteed within the entire range. In addition, the design of the hardware circuit and the zero drift of the electronic device will also reduce the accuracy of the calibration [10, 11]. Therefore, this method is generally not used in scenes that require precise calibration.The principle of the mathematical model calibration algorithm is utilizing a limited number of sample information to establish a mathematical model of the measurement signal according to the principle of minimum error. In article [12], Jin put forward a calibration method based on OC-SVM. This method can detect the change points in the time series and obtain better accuracy using less training data. However, it is difficult to establish a corresponding mathematical model for nonlinear systems. Wang, Kong [13], and others classified the errors of the acoustic vector sensor array and designed an optimization model and error self-calibration algorithm for the acoustic vector sensor array. This algorithm can perform quite well in parameter estimation, but when the mathematical model is established, the iterative calculation of coefficients still needs much work. Therefore, this method is generally not used in actual projects which require a large number of data calculation [14].The nonlinear segmented calibration method divides the uncalibrated data into segments and then linearizes these sections. Wang, Peng [15], and Chengxian [16] both chose this method to do calibration work, because it can achieve high accuracy though the accuracy often depends on the experience of the calibrator. Moreover, if the calibration results fail to meet the standard, it is necessary to perform the segmented calibration again. In most cases, the calibration efficiency is not high enough; thus, the calibration workload is relatively large. To solve this problem, a calibration algorithm based on discrete Fourier transform (DFT) is provided in paper [17, 18]. This method directly carries on the Fourier transform processing to the sampled data sequence, which has the advantages of fast operation speed and less computation. However, the algorithm is mainly suitable for harmonic measurement, and due to the frequency spectrum leakage under the frequency shift condition, the algorithm error is large.In this paper, a nonlinear calibration method based on sinusoidal excitation and DFT transform is presented. This method uses the initial phase calculated by DFT to establish the relationship of the original dense set and then establishes the mapping relationship between the actual sampling value and the theoretical calibration value in the selected calibration interval. After that, by interpolating the data, an ideal calibration curve is obtained.


## 2. Fundamental Knowledge of the Proposed Method

### 2.1. Algorithm Analysis

To implement this algorithm, it is necessary to determine the mapping relationship between the original sampled value and the theoretical value. For the purpose of determining the mapping relationship, the signal is sampled with a fixed sampling ratefs. Then, Fourier transform is performed on the obtained discrete sequence of sampling points to calculate the phase φ0 at the initial moment of the fundamental frequency. Next, the initial phase can be used to calculate the theoretical discrete expression of the original signal. The theoretical value corresponding to the sampled value is calculated through the theoretical discrete expression, and the mapping relationship between the original sampled values and the theoretical values is established. Then, determine the minimum calibration interval. In order to make the calibration interval include the maximum range of the signal amplitude, the interval can be calibrated from the trough of the signal to the peak of the wave, which is half a period. According to the initial phase φ0 and the set standard source effective value Am, the mapping relationship between the theoretical value and the actual sampling value in the calibration interval is established, and the denoising process is performed. Finally, a smooth calibration curve is obtained by spline interpolation for the calibration points mapped in the two-dimensional coordinate system, and we can obtain the theoretical valued of other sampling points from the calibration curve. The overall flow of the algorithm is shown in Figure 1.Figure 1
Schematic diagram of calibration algorithm.Take a power signal as an example for specific description. Performing fixed frequency sampling on the measured original signal, the sampling ratefs is 25600 Hz, the sampling period N is 10, and the number of sampling points in each period is 512; then, the fundamental frequency of the original signal is fb=1/Ts×M=fs/M, and it is 50 Hz.


### 2.2. Solve the Initial Phase by DFT

CollectN cycles of data on the original voltage or current signal and do DFT on the collected discrete time series xkk=0,1,⋯,N×M−1, M=512, as shown in formula (1).
(1)Xfb=∑k=0N×M−1xk×e−j2πfbN×Mk.The calculation resultXfb is a complex number, which can be expressed as Xfb=XRfb+XIfb×i.The expressions for the real and imaginary parts are
(2)XRfb=∑k=0N×M−1xkcos2πkfb/N×M,XIfb=−∑k=0N×M−1xksin2πkfb/N×M.According to the real and imaginary parts of the complex number, the initial phaseφ0=arctanXIfb/XRfb of the current signal with the fundamental frequency fb can be calculated, and the continuous expression of the original signal is
(3)y=Am×coswt+φ0.Since the sampling points are discrete, continuous expressions need to be converted into discrete expressions. The discrete sequencexk is sampled and extracted at time t; so, the relational expression between time t and subscript k is
(4)t=fb×Ts×k.According to formula (4), convert the continuous expression of the signal into a theoretical discrete expression:
(5)yk=Am×cos2πfb×Ts×k+φ0,whereAm is the amplitude of the waveform output by the calibration source. Since there is a mapping relationship betweenyk and k and xk and k in the theoretical discrete expression, there is also a one-to-one correspondence between yk and xk. The xk,yk mapping relationship of N×M sampling points can be obtained in N sampling periods, and the original dense set is established.


### 2.3. Calibration of Calibration Curve

In order to ensure that the maximum range of the measured signal can be covered, the calibration interval is determined to beAm×cosπ,Am×cos2π according to the theoretical discrete expression of the original signal, which is the maximum range. Next, take the left end point Am×cosπ of the calibration interval as the starting point and calculate the subscript k0 corresponding to the sampling point. The calculation formula of k0 is as follows:
(6)k0=π−φ0×M/2π.Thek0 calculated by the above formula is not necessarily a positive integer. If k0 is a positive integer, then the sampled value xk0 of the sampling point is recorded as x0,, and the theoretical value yk0 is calculated by the theoretical discrete expressionyk0=Am×cos2πfb×Ts×k0+φ0 and recorded as y0,. If k0 is not an integer, the sampling value xk0 of the nearest sampling point from the starting point is recorded as x0,, and the theoretical value yk0 is recorded as y0,.According to formula (6) and the relationship between signal fundamental frequency fb and fixed frequency sampling frequency fs, fb=fs/M, as the frequency fb increases, the sampling point M decreases; so, the subscript of the sampling point k0 also decreases. According to formula (5), when the amplitude Am and fb change, the corresponding theoretical value of calibration yk will change, which means that the calibration coefficient will change. The initial phase φ0 is obtained by DFT calculation, which will not affect the calibration process.TakingAm×cosπ as the starting point, calculate the subscript k of subsequent sampling points in the calibration interval. Because x0, corresponds to the point xk0 with the subscript k0 in the original sequence xk, the original sequence xk starts from the subscript k0 and takes a sampling point every ΔM points as the new sequence x,. The points in are marked as x1,,x2,⋯xk,⋯xM/△M,, and then the original sequence xiand the new sequence xi, have the following mapping relationship:
(7)xk,=xΔM×k+k0.Substituting the expression ofxk, in formula (7) into the theoretical discrete expression, the corresponding yk, is
(8)yk,=Am×cos2πfb×Ts×ΔM×k+k0+φ0.M/ΔM calibration points can be taken in each cycle, and N×M/ΔM sampling points are taken as calibration points in a total of Nsampling cycles, and a mapping relationship of xk,,yk, is established.InN sampling cycles, the sampling points in each cycle are repeated periodically and the sampling points in each half cycle in a cycle are mirror symmetrical. Therefore, it is necessary to average the repeated 2N sampling points. The process of averaging can be regarded as the process of smoothing and removing noise. The calculation formula is as follows:
(9)xk,,=xk,+xM/ΔM−k−1,+xk+M/ΔM,⋯+xk+N×M/ΔM,+xN×M/ΔM−k−1,2N,yk,,=yk,+yM/ΔM−k−1,+yk+M/ΔM,⋯+yk+N×M/ΔM,+yN×M/ΔM−k−1,2N.After averaging, the mapping relationship ofxk,,,yk,, with subscript k from 0 to M/2ΔM−1 totaling M/2ΔM sampling points is obtained. The obtained M/2ΔM sampling points are the required calibration points.There are many ways to establish the calibration relationship forxk,,,yk,, of M/2ΔM sampling points. The available methods include straight line fitting, polynomial fitting, and interpolation. Straight line fitting can only guarantee the continuity in the interval, but cannot guarantee the smoothness in the calibration curve. In the polynomial curve fitting, if there is a large deviation of some data points, the fitting accuracy will decrease as the order increases. So, the spline interpolation method is used in this article.


### 2.4. Cubic Spline Interpolation

The spline interpolation method is a method that draws a curve of all points in the form of variable splines [19–21]. Every two adjacent points can determine the polynomial of each segment; so, the spline interpolation is composed of a series of polynomials. Cubic spline interpolation is a widely used spline interpolation method, and each segment is a cubic polynomial. This method has several advantages, the piece-wise low-order interpolation polynomials are easier to solve and that can improve the smoothness of the interpolation function as good as high-order spline interpolation. Meanwhile, the compensation effect at adjacent frequency points is better than straight line fitting.The calculation method of cubic spline interpolation used in this paper is explained below. The mapping between the original value and the spline value is as follows:(10)x:a=x0<x1<⋯<xn=by:y0y1⋯yn.The cubic spline functionSx is a piece-wise cubic equation, with intervals and n+1 data points. The cubic equation for each interval obeys the following conditions:
(1)
In each intervalxi,xi+1, Sx=Six is a cubic polynomial(11)Sixi=yii=0,1,⋯,n.(2)
The first derivativeS′x and the second derivative S′′x of the cubic spline function Sx are continuous in a,b, and Sx is smooth and continuousTherefore, the cubic polynomial created for each interval can be written as(12)Six=ai+bix−xi+cix−xi2+dix−xi3,i=0,1,⋯,n−1.The derivation process of calculating these unknown coefficientsai, bi, ci, and di is as follows:
(1)
Calculate the step length of each segmenthi=xi+1−xii=0,1,⋯,n−1(2)
The formulaai=yi can be derived from the formula Sixi=yi(3)
Derived from the formulaSixi+1=yi+1i=0,1,⋯,n−1:(13)ai+hibi+hi2ci+hi3di=yi+1.(4)
According to the differential continuity of the splineSi′xi+1=Si+1′xi+1i=0,1,⋯,n−2,(14)bi+2cihi+3dihi2−bi+1=0.Similarly, according toSi′′xi+1=Si+1′′xi+1i=0,1,⋯,n−2,
(15)2ci+6dihi−2ci+1=0.(5)
mi=Si′′xi=2ci, bi, ci, and di can be expressed by mi, then using the Cubic spline interpolation method to get the following results:(16)ai=yi,bi=yi+1−yihi−hi2mi−hi6mi+1−mi,ci=mi2,di=mi+1−mi6hi.(6)
Substitutebi, ci, and di into formula (14):(17)himi+2hi+hi+1mi+1+hi+1mi+2=6yi+2−yi+1hi+1−yi+1−yihi.When there aren−1 equations and n+1 unknown m values to be solved, two additional formulas are needed to solve this equation. Therefore, the boundary conditions are used to limit the differential values of the two endpoints x0 and xn [22], that is, the second-order differential S′′=0, which is expressed as m0=0 and mn=0. The equation to be solved can be expressed as
(18)100⋯0h02h0+h1h100h12h1+h2h2000h22h2+h3h3⋮⋮⋱⋱⋱0hn−22hn−2+hn−1hn−10⋯001m0m1m1m3⋮m3=60y2−y1h1−y1−y0h0y3−y2h2−y2−y1h1y4−y3h3−y3−y2h2⋮yn−yn−1hn−1−yn−1−yn−2hn−20.So, the following step is to solve the equation to getmi and then calculate the values of all unknown parameters bi, ci, and di using mi, and the expression of the spline curve Six can be finally obtained.According to the interpolation method, a spline curve is drawn for the mapping relationship ofxk,,,yk,, of M/2ΔM points after averaging. The sequence xi,, contains the maximum range of the sampled value, which means the abscissa of the spline curve’s range of the sampled value is maximized as well. There are still work to be done to deal with other sampling points to be calibrated: first, determine which interval of the spline curve xi,,,xi+1,, the sampling value falls within and then substitute the sampling value yi,, into the corresponding piece-wise function Six to calculate the corresponding theoretical value.


## 2.1. Algorithm Analysis

To implement this algorithm, it is necessary to determine the mapping relationship between the original sampled value and the theoretical value. For the purpose of determining the mapping relationship, the signal is sampled with a fixed sampling ratefs. Then, Fourier transform is performed on the obtained discrete sequence of sampling points to calculate the phase φ0 at the initial moment of the fundamental frequency. Next, the initial phase can be used to calculate the theoretical discrete expression of the original signal. The theoretical value corresponding to the sampled value is calculated through the theoretical discrete expression, and the mapping relationship between the original sampled values and the theoretical values is established. Then, determine the minimum calibration interval. In order to make the calibration interval include the maximum range of the signal amplitude, the interval can be calibrated from the trough of the signal to the peak of the wave, which is half a period. According to the initial phase φ0 and the set standard source effective value Am, the mapping relationship between the theoretical value and the actual sampling value in the calibration interval is established, and the denoising process is performed. Finally, a smooth calibration curve is obtained by spline interpolation for the calibration points mapped in the two-dimensional coordinate system, and we can obtain the theoretical valued of other sampling points from the calibration curve. The overall flow of the algorithm is shown in Figure 1.Figure 1
Schematic diagram of calibration algorithm.Take a power signal as an example for specific description. Performing fixed frequency sampling on the measured original signal, the sampling ratefs is 25600 Hz, the sampling period N is 10, and the number of sampling points in each period is 512; then, the fundamental frequency of the original signal is fb=1/Ts×M=fs/M, and it is 50 Hz.


## 2.2. Solve the Initial Phase by DFT

CollectN cycles of data on the original voltage or current signal and do DFT on the collected discrete time series xkk=0,1,⋯,N×M−1, M=512, as shown in formula (1).
(1)Xfb=∑k=0N×M−1xk×e−j2πfbN×Mk.The calculation resultXfb is a complex number, which can be expressed as Xfb=XRfb+XIfb×i.The expressions for the real and imaginary parts are
(2)XRfb=∑k=0N×M−1xkcos2πkfb/N×M,XIfb=−∑k=0N×M−1xksin2πkfb/N×M.According to the real and imaginary parts of the complex number, the initial phaseφ0=arctanXIfb/XRfb of the current signal with the fundamental frequency fb can be calculated, and the continuous expression of the original signal is
(3)y=Am×coswt+φ0.Since the sampling points are discrete, continuous expressions need to be converted into discrete expressions. The discrete sequencexk is sampled and extracted at time t; so, the relational expression between time t and subscript k is
(4)t=fb×Ts×k.According to formula (4), convert the continuous expression of the signal into a theoretical discrete expression:
(5)yk=Am×cos2πfb×Ts×k+φ0,whereAm is the amplitude of the waveform output by the calibration source. Since there is a mapping relationship betweenyk and k and xk and k in the theoretical discrete expression, there is also a one-to-one correspondence between yk and xk. The xk,yk mapping relationship of N×M sampling points can be obtained in N sampling periods, and the original dense set is established.


## 2.3. Calibration of Calibration Curve

In order to ensure that the maximum range of the measured signal can be covered, the calibration interval is determined to beAm×cosπ,Am×cos2π according to the theoretical discrete expression of the original signal, which is the maximum range. Next, take the left end point Am×cosπ of the calibration interval as the starting point and calculate the subscript k0 corresponding to the sampling point. The calculation formula of k0 is as follows:
(6)k0=π−φ0×M/2π.Thek0 calculated by the above formula is not necessarily a positive integer. If k0 is a positive integer, then the sampled value xk0 of the sampling point is recorded as x0,, and the theoretical value yk0 is calculated by the theoretical discrete expressionyk0=Am×cos2πfb×Ts×k0+φ0 and recorded as y0,. If k0 is not an integer, the sampling value xk0 of the nearest sampling point from the starting point is recorded as x0,, and the theoretical value yk0 is recorded as y0,.According to formula (6) and the relationship between signal fundamental frequency fb and fixed frequency sampling frequency fs, fb=fs/M, as the frequency fb increases, the sampling point M decreases; so, the subscript of the sampling point k0 also decreases. According to formula (5), when the amplitude Am and fb change, the corresponding theoretical value of calibration yk will change, which means that the calibration coefficient will change. The initial phase φ0 is obtained by DFT calculation, which will not affect the calibration process.TakingAm×cosπ as the starting point, calculate the subscript k of subsequent sampling points in the calibration interval. Because x0, corresponds to the point xk0 with the subscript k0 in the original sequence xk, the original sequence xk starts from the subscript k0 and takes a sampling point every ΔM points as the new sequence x,. The points in are marked as x1,,x2,⋯xk,⋯xM/△M,, and then the original sequence xiand the new sequence xi, have the following mapping relationship:
(7)xk,=xΔM×k+k0.Substituting the expression ofxk, in formula (7) into the theoretical discrete expression, the corresponding yk, is
(8)yk,=Am×cos2πfb×Ts×ΔM×k+k0+φ0.M/ΔM calibration points can be taken in each cycle, and N×M/ΔM sampling points are taken as calibration points in a total of Nsampling cycles, and a mapping relationship of xk,,yk, is established.InN sampling cycles, the sampling points in each cycle are repeated periodically and the sampling points in each half cycle in a cycle are mirror symmetrical. Therefore, it is necessary to average the repeated 2N sampling points. The process of averaging can be regarded as the process of smoothing and removing noise. The calculation formula is as follows:
(9)xk,,=xk,+xM/ΔM−k−1,+xk+M/ΔM,⋯+xk+N×M/ΔM,+xN×M/ΔM−k−1,2N,yk,,=yk,+yM/ΔM−k−1,+yk+M/ΔM,⋯+yk+N×M/ΔM,+yN×M/ΔM−k−1,2N.After averaging, the mapping relationship ofxk,,,yk,, with subscript k from 0 to M/2ΔM−1 totaling M/2ΔM sampling points is obtained. The obtained M/2ΔM sampling points are the required calibration points.There are many ways to establish the calibration relationship forxk,,,yk,, of M/2ΔM sampling points. The available methods include straight line fitting, polynomial fitting, and interpolation. Straight line fitting can only guarantee the continuity in the interval, but cannot guarantee the smoothness in the calibration curve. In the polynomial curve fitting, if there is a large deviation of some data points, the fitting accuracy will decrease as the order increases. So, the spline interpolation method is used in this article.


## 2.4. Cubic Spline Interpolation

The spline interpolation method is a method that draws a curve of all points in the form of variable splines [19–21]. Every two adjacent points can determine the polynomial of each segment; so, the spline interpolation is composed of a series of polynomials. Cubic spline interpolation is a widely used spline interpolation method, and each segment is a cubic polynomial. This method has several advantages, the piece-wise low-order interpolation polynomials are easier to solve and that can improve the smoothness of the interpolation function as good as high-order spline interpolation. Meanwhile, the compensation effect at adjacent frequency points is better than straight line fitting.The calculation method of cubic spline interpolation used in this paper is explained below. The mapping between the original value and the spline value is as follows:(10)x:a=x0<x1<⋯<xn=by:y0y1⋯yn.The cubic spline functionSx is a piece-wise cubic equation, with intervals and n+1 data points. The cubic equation for each interval obeys the following conditions:
(1)
In each intervalxi,xi+1, Sx=Six is a cubic polynomial(11)Sixi=yii=0,1,⋯,n.(2)
The first derivativeS′x and the second derivative S′′x of the cubic spline function Sx are continuous in a,b, and Sx is smooth and continuousTherefore, the cubic polynomial created for each interval can be written as(12)Six=ai+bix−xi+cix−xi2+dix−xi3,i=0,1,⋯,n−1.The derivation process of calculating these unknown coefficientsai, bi, ci, and di is as follows:
(1)
Calculate the step length of each segmenthi=xi+1−xii=0,1,⋯,n−1(2)
The formulaai=yi can be derived from the formula Sixi=yi(3)
Derived from the formulaSixi+1=yi+1i=0,1,⋯,n−1:(13)ai+hibi+hi2ci+hi3di=yi+1.(4)
According to the differential continuity of the splineSi′xi+1=Si+1′xi+1i=0,1,⋯,n−2,(14)bi+2cihi+3dihi2−bi+1=0.Similarly, according toSi′′xi+1=Si+1′′xi+1i=0,1,⋯,n−2,
(15)2ci+6dihi−2ci+1=0.(5)
mi=Si′′xi=2ci, bi, ci, and di can be expressed by mi, then using the Cubic spline interpolation method to get the following results:(16)ai=yi,bi=yi+1−yihi−hi2mi−hi6mi+1−mi,ci=mi2,di=mi+1−mi6hi.(6)
Substitutebi, ci, and di into formula (14):(17)himi+2hi+hi+1mi+1+hi+1mi+2=6yi+2−yi+1hi+1−yi+1−yihi.When there aren−1 equations and n+1 unknown m values to be solved, two additional formulas are needed to solve this equation. Therefore, the boundary conditions are used to limit the differential values of the two endpoints x0 and xn [22], that is, the second-order differential S′′=0, which is expressed as m0=0 and mn=0. The equation to be solved can be expressed as
(18)100⋯0h02h0+h1h100h12h1+h2h2000h22h2+h3h3⋮⋮⋱⋱⋱0hn−22hn−2+hn−1hn−10⋯001m0m1m1m3⋮m3=60y2−y1h1−y1−y0h0y3−y2h2−y2−y1h1y4−y3h3−y3−y2h2⋮yn−yn−1hn−1−yn−1−yn−2hn−20.So, the following step is to solve the equation to getmi and then calculate the values of all unknown parameters bi, ci, and di using mi, and the expression of the spline curve Six can be finally obtained.According to the interpolation method, a spline curve is drawn for the mapping relationship ofxk,,,yk,, of M/2ΔM points after averaging. The sequence xi,, contains the maximum range of the sampled value, which means the abscissa of the spline curve’s range of the sampled value is maximized as well. There are still work to be done to deal with other sampling points to be calibrated: first, determine which interval of the spline curve xi,,,xi+1,, the sampling value falls within and then substitute the sampling value yi,, into the corresponding piece-wise function Six to calculate the corresponding theoretical value.


## 3. Implementation of the Proposed Method

### 3.1. Simulation

The key point of this calibration method is to accurately establish the mapping relationship between the measured signal sampling value and the theoretical value.The realization process of this method has been theoretically deduced above. Now, carry out a simulation experiment on this method and compare the final calibration curve obtained by the calibration algorithm proposed above with the calibration curve ofyk and xk of the given hypothesis. Calculate the errors of the two calibration curves. If the error meets the accuracy requirements, which means the calibration curve obtained by the algorithm is close enough to the real calibration curve, so the calibration algorithm can be considered feasible.Assuming that the frequency of the given original signal isf=50Hz, the amplitude of the signal Am is 100, the number of sampling points per period N is 512, the initial phase φ0 is given as 60∘, and the theoretical discrete expression of the original signal is yk=100×cosπk/256+π/3. According to the characteristics of the sensor, the calibration relationship between the sampled value xk of the original signal and the theoretical value xk is as follows:
(19)yk=fxk=12xk+12xk2xk≥012xk−12xk2xk<0.The calibration curve of the available calibration relationship is shown in Figure2:Figure 2
Calibration curve.Knowing the relationship between the theoretical discrete expressionyk and k and also the actual nonlinear relationship between the sampled value xk and the theoretical value yk, xk can be inversely deduced according to xk=f−1yk. The simulated waveform of the original sequence of xk is shown in Figure 3, the abscissa represents time, and the ordinate represents amplitude:Figure 3
The original sequence waveform.Using the method mentioned above, the mapping relationship between the sampling valuexk and the theoretical value yk is established through the theoretical discrete expression, and the 32 sampling points obtained are calibrated, as shown in Figure 4:Figure 4
Calibration diagram of calibration points.Use cubic spline interpolation to make a continuous smooth calibration curveSx from 32 calibration points. Figure 5 shows the calibration curve obtained according to cubic spline interpolation.Figure 5
Calibration curve of cubic spline interpolation.Compared with the calibration curvey=fx given in Figure 2, the calibration curve made by spline interpolation is very close to the given calibration curve.Substitute all the sampled values in a period into the calibration curve and the actual calibration curve, respectively, and calculate the relative error between them. The abscissa of Figure6 is the sampled value, and the ordinate is the error of the true value minus the compensation value after calibration, which can be seen from the figure is that the relative error is less than ±3×10−4. Therefore, the calibration algorithm proposed in this paper is feasible.Figure 6
Relative error of calibration curve.


### 3.2. Software Verification

The principle and simulation of the calibration algorithm based on sinusoidal excitation and DFT transform are described above. The calibration method firstly sets the standard source output frequencyfb and the sine signal with the maximum value of Am, collects the original signal sequence xk, calculates the initial time phase φ0 of xk, and obtains the discrete expression of the original signal according to φ0. Then, determine the calibration interval of the original signal and establish the mapping relationship between the sampling value and the theoretical value in the calibration interval. Finally, for the processed calibration points, use cubic spline interpolation to make a calibration curve and substitute all the sample values to be calibrated into the calibration curve to calculate the theoretical value. Figure 7 is a specific flow chart of the algorithm.Figure 7
Calibration algorithm flow.


## 3.1. Simulation

The key point of this calibration method is to accurately establish the mapping relationship between the measured signal sampling value and the theoretical value.The realization process of this method has been theoretically deduced above. Now, carry out a simulation experiment on this method and compare the final calibration curve obtained by the calibration algorithm proposed above with the calibration curve ofyk and xk of the given hypothesis. Calculate the errors of the two calibration curves. If the error meets the accuracy requirements, which means the calibration curve obtained by the algorithm is close enough to the real calibration curve, so the calibration algorithm can be considered feasible.Assuming that the frequency of the given original signal isf=50Hz, the amplitude of the signal Am is 100, the number of sampling points per period N is 512, the initial phase φ0 is given as 60∘, and the theoretical discrete expression of the original signal is yk=100×cosπk/256+π/3. According to the characteristics of the sensor, the calibration relationship between the sampled value xk of the original signal and the theoretical value xk is as follows:
(19)yk=fxk=12xk+12xk2xk≥012xk−12xk2xk<0.The calibration curve of the available calibration relationship is shown in Figure2:Figure 2
Calibration curve.Knowing the relationship between the theoretical discrete expressionyk and k and also the actual nonlinear relationship between the sampled value xk and the theoretical value yk, xk can be inversely deduced according to xk=f−1yk. The simulated waveform of the original sequence of xk is shown in Figure 3, the abscissa represents time, and the ordinate represents amplitude:Figure 3
The original sequence waveform.Using the method mentioned above, the mapping relationship between the sampling valuexk and the theoretical value yk is established through the theoretical discrete expression, and the 32 sampling points obtained are calibrated, as shown in Figure 4:Figure 4
Calibration diagram of calibration points.Use cubic spline interpolation to make a continuous smooth calibration curveSx from 32 calibration points. Figure 5 shows the calibration curve obtained according to cubic spline interpolation.Figure 5
Calibration curve of cubic spline interpolation.Compared with the calibration curvey=fx given in Figure 2, the calibration curve made by spline interpolation is very close to the given calibration curve.Substitute all the sampled values in a period into the calibration curve and the actual calibration curve, respectively, and calculate the relative error between them. The abscissa of Figure6 is the sampled value, and the ordinate is the error of the true value minus the compensation value after calibration, which can be seen from the figure is that the relative error is less than ±3×10−4. Therefore, the calibration algorithm proposed in this paper is feasible.Figure 6
Relative error of calibration curve.


## 3.2. Software Verification

The principle and simulation of the calibration algorithm based on sinusoidal excitation and DFT transform are described above. The calibration method firstly sets the standard source output frequencyfb and the sine signal with the maximum value of Am, collects the original signal sequence xk, calculates the initial time phase φ0 of xk, and obtains the discrete expression of the original signal according to φ0. Then, determine the calibration interval of the original signal and establish the mapping relationship between the sampling value and the theoretical value in the calibration interval. Finally, for the processed calibration points, use cubic spline interpolation to make a calibration curve and substitute all the sample values to be calibrated into the calibration curve to calculate the theoretical value. Figure 7 is a specific flow chart of the algorithm.Figure 7
Calibration algorithm flow.


## 4. Experiment Result and Analysis

To decide whether the accuracy of the calibration algorithm on the high-precision power analyzer meets the design requirements, an experimental test platform is built. By comparing the measurement data of the power analyzer equipped with our algorithm and other high-precision testing equipment, the analysis results are obtained.The specific experimental platform of this project is shown in Figure8. On the right is the Fluke standard source 6003A as standard input, on the left is the power analyzer equipped with this calibration method, and on the lower left is Yokogawa’s WT1800 high-precision power analyzer. The actual product is shown below. Connect the input signal of the standard source to the power analyzer to be tested and the Yokogawa power meter, respectively, and compare the measurement data of the two.Figure 8
Experimental platform.Before the measurement experiment, the high-precision power analyzer needs to be calibrated. The frequency measurement range of the power meter is 10 Hz-1 kHz, the voltage measurement range is 0.1 V-1000 V, and the current range is 0.1A-80A. The voltage measurement accuracy is 0.2% of range, and current measurement accuracy is 0.1% of range add current sensor accuracy. With fluke standard source as input, the instrument is calibrated separately with two methods, the traditional segmented calibration method and the calibration method proposed in this article. After calibration, the measured signals of the two are shown and compared in the following Tables1–4.Table 1
Voltage measurement comparison.
AC voltage (V) signal frequency 100 HzStandard valueThe old methodThe proposed methodPhase APhase BPhase CPhase APhase BPhase C30.0030.0129.9829.9730.0029.9629.9560.0059.9659.9860.0260.0559.9859.94100.00100.02100.04100.01100.0899.9699.96220.00220.11220.13220.05220.16219.92219.90380.00379.90380.28379.86380.24379.88379.85500.00500.04499.77499.85500.31500.47499.97660.00660.39660.56659.67660.67659.64659.78800.00801.18801.28800.79800.85800.83799.69950.00950.95951.58950.62951.52949.50948.89Table 2
100 Hz current measurement comparison.
AC current (A) signal frequency 100 HzStandard valueThe old methodThe proposed methodPhase APhase BPhase CPhase APhase BPhase C0.100.100.100.100.100.100.100.500.490.500.490.490.490.491.000.990.990.990.980.990.985.005.004.995.004.974.984.9910.0010.049.9810.019.999.9810.0125.0025.0924.8125.1124.9024.9824.9440.0038.9839.0138.6439.8540.0439.9655.0052.1851.9552.0254.2454.4354.32Table 3
500 Hz current measurement comparison.
AC current (A) signal frequency 500 HzStandard valueThe old methodThe proposed methodPhase APhase BPhase CPhase APhase BPhase C0.100.100.100.100.100.100.100.500.490.500.490.490.490.491.000.980.970.980.980.990.985.005.014.995.004.995.014.9910.0010.049.9710.029.979.9810.0125.0025.2524.7625.2124.9524.9524.9040.0038.6838.8938.3539.8840.0239.9755.0051.8451.7251.8854.3454.4554.40Table 4
1000 Hz current measurement comparison.
AC current (A) signal frequency 1000 HzStandard valueThe old methodThe proposed methodPhase APhase BPhase CPhase APhase BPhase C0.100.100.100.100.100.100.100.500.490.500.490.490.490.491.000.990.990.990.990.990.985.005.014.975.004.984.974.9910.0010.119.889.869.999.9810.0125.0024.7224.6825.1824.9224.9424.9140.0038.6239.2838.4639.7940.0839.8955.0051.7851.6551.7154.2454.3154.29As can be seen from Table1, the effect of the two calibration methods on voltage measurement is basically the same, because the linearity of the voltage sensor in the actual project is better. The nonlinearity of current sensors is usually poor, and the calibration method proposed in this article is usually used in the current calibration process to achieve high-accuracy. From Tables 2–4, the proposed calibration method is obviously better than the traditional segmented calibration method when measuring large current and high frequency signals. When using this method to measure voltage, the error of the measured value is the largest at 950 V, the error is 951.52−950/950=0.16%<0.2%, and the voltage accuracy meets the requirements. When the current is measured at 55 A, the error of the current sensor has exceeded 2%, but the maximum error shown in Tables 2–4 is 55−54.24/55=1.38%, which meets the requirements of current accuracy. The comparison of experimental results verifies that the calibration method proposed in this paper is effective in the application of nonlinear systems and has high calibration accuracy.


## 5. Conclusion

In this paper, a nonlinear calibration algorithm based on sinusoidal excitation and DFT transformation is proposed. This algorithm overcomes the shortcomings of traditional methods, like it is difficult to determine the segment turning point and segment range in old methods, and multiple manual calibrations are cumbersome; also, the calibration accuracy can decline within the overall measurement range. In addition, this method only needs to obtain the effective value data of the current calibration source. Even if the segment turning point is increased, the calibration of the instrument can be accurately completed by obtaining the effective value data only once, which not only improves the calibration accuracy but also avoids repeated operation of the calibration source, thus greatly improves the calibration efficiency. The simulation experiment verifies the feasibility and accuracy of the algorithm, and the voltage and current parameters are measured by a high-precision power analyzer equipped with the algorithm. The experimental results show that the measured values of the voltage and current after calibration within the range meet the accuracy requirements.



---

*Source: 5578361-2021-10-04.xml*