In the electromagnetic field measurement data postprocessing, this paper introduced the moving least squares (MLS) approximation method. The MLS combines the concept of moving window and compact support weighting functions. It can be regarded as a combination of weighted least squares and segmented least square. The MLS not only can acquire higher precision even with low order basis functions, but also has good stability due to its local approximation scheme. An attractive property of MLS is its flexible adjustment ability. Therefore, the data fitting can be easily adjusted by tuning weighting function’s parameters. Numerical examples and measurement data processing reveal its superior performance in curves fitting and surface construction. So the MLS is a promising method for measurement data processing.
The measurement data of electromagnetic (EM) field plays a key role in EM environment assessment. However, the measurement points are limited, and, in order to describe the EM field distribution more accurately, the postprocessing is necessary. The data acquiring for nonmeasurement point is essentially a typical function approximation or surface construction problem. Owing to the instruments errors, environmental interference, or terrain changes, the deviation emerges inevitably and the fitting method is preferred in the postprocessing.
Currently, the least squares (LS) method has been most widely used in data fitting. The commonly used basis functions are polynomials [
The MLS approximation was introduced by Lancaster and Salkauskas for surface generation problems [
As a data fitting method, the MLS can be regarded as a combination of WLS and SLS because of its compact support weighting function. Moreover, the introduced moving window in MLS shows superior performance versus SLS. Firstly, the compact support weighting function indicates that only partial measurement data nearby the unknown measurement point are involved in calculating which indicates the MLS inherits localized treatment of SLS. Then, the segmentation is rigid in SLS and causes the problems of how to select the segment and fitting discontinuity. However, the moving window in MLS acts as a soft segment. The segment selection is avoided and the fitting continuity and smoothness are guaranteed. Finally, weighting function parameters provide a convenient adjustment option for MLS.
Hence, this paper proposed the MLS method for measurement data fitting. The structure of the paper is as follows. In Section
In MLS, an arbitrary function
The obvious difference between the traditional LS method and MLS is the coefficients. For MLS, the coefficients
Schematic diagram of weighted scheme in MLS.
The weight is still imposed on the square error between fitting and given value. However, with respect to the WLS, the main difference is the weighting function which means a locally defined function in MLS versus a global one in WLS. Owing to the compact support, only the nodes that located in the support domain are involved for coefficients calculation, so it is similar to the SLS. The matrix form for (
Select weighting function
Calculate the weight function of
Obtain the matrixes
Calculate the inverse matrix
Form shape function
Weighting function plays a very important role in MLS. In the previous pattern, the vector
The basic requirements for weighting function are compact support, nonnegative definite, and continuous and with higher derivatives so as to ensure the uniqueness of the coefficients. The compact support characteristic is the essence for MLS. It is obvious from Figure
The commonly used weighting functions include the Gaussian, cubic spline function and compact supported radial basis function (CSRBF). However, we focused on the Gaussian and cubic spline function in this paper. The Gaussian weighting function is
There are two adjustment parameters as
Weighting functions in MLS.
Consequently, we can conclude the following in MLS.
For basis functions selection, the linear, quadratic, or higher order polynomials are the candidates. As polynomials order increases, better smoothness fitting is obtained. However, the computation cost will significantly increase and even lead to illconditioned problems. Therefore, in two or threedimensional cases, only lower order polynomials are preferred.
For parameter setting in Gaussian weighting function, the influencing radius
Two numerical examples are carried out to investigate the fitting performance of MLS. One is a periodic function and the other is the famous test function in Runge phenomenon. Their formula is
Test functions and noisy data.
Fitting curves comparison between MLS and LS.
It can be seen obviously that the local approximation scheme of MLS can acquire much better results than LS method. The MLS fitting curve can follow the changes of the original function even with low order basis function, while, for the global approximation scheme like LS, the oscillation phenomenon occurs and the approximation error increases dramatically. Here, we defined the relative root mean square error (RRMSE) as
Error comparisons between MLS and LS.
Functions  MLS  LS  

Linear basis ( 
Cubic basis ( 
Sixthorder polynomials  Fourthorder polynomials  
MAE  RRMSE  MAE  RRMSE  MAE  RRMSE  MAE  RRMSE  


















In this section, the electric field intensity
Measure points’ distribution in 500 kV substation.
The corresponding measurement data of
The measurement data of electric field intensity
( 













4.949  3.277  2.347  3.23  4.112  3.615  4.316  2.903  3.569  4.801  5.473 

6.797  5.301  4.485  5.788  6.485  5.945  6.467  6.548  6.227  7.038  9.313 

5.612  4.686  4.24  6.243  6.281  5.435  8.081  7.618  7.579  7.984  7.909 

2.152  1.307  3.431  5.155  4.385  4.334  5.504  5.864  5.78  6.211  7.121 

1.751  2.802  4.571  5.501  4.268  1.798  3.929  3.343  6.646  8.955  5.446 

5.462  4.854  6.211  6.829  7.205  6.144  3.186  3.889  6.135  6.167  6.787 

4.791  4.184  5.969  8.217  9.332  5.625  4.492  4.57  6.242  8.215  9.666 

1.804  4.701  4.918  7.875  6.825  2.389  4.218  5.613  5.093  8.519  10.84 

4.829  6.525  5.528  7.087  5.527  4.284  4.377  7.031  6.907  7.782  10.2 

9.263  10.15  10.81  8.395  8.305  2.93  10.63  9.105  10.26  11.07  9.338 

9.487  3.081  6.437  8.27  8.213  6.467  9.992  8.564  8.012  9.816  11.5 

12.93  10.87  9.811  9.748  11.15  7.88  11.49  8.632  10.26  13.2  13.38 

10.87  8.478  5.087  8.386  8.919  7.857  7.27  6.813  5.774  6.735  12.87 

9.77  3.571  5.102  7.923  8.048  7.049  6.839  6.73  6.028  7.398  13.34 

9.21  8.824  9.278  10.13  9.922  4.093  9.181  7.557  9.081  11.72  14.2 

7.484  7.209  8.727  9.804  9.198  4.547  6.29  6.197  6.387  8.708  12.87 

6.486  5.893  4.438  7.916  7.709  4.464  4.973  5.132  5.46  7.527  10.07 

6.453  6.077  3.573  5.424  4.939  4.408  4.336  4.926  3.78  4.337  6.833 

10.55  9.301  7.643  7.029  7.144  5.988  8.715  7.662  7.267  7.548  7.905 

9.761  10.3  8.221  8.272  7.264  3.85  9.635  9.294  7.918  8.52  8.154 

10.91  10.32  9.822  9.683  10.01  3.887  9.962  9.198  9.145  9.494  9.047 

9.75  7.933  5.084  7.867  7.022  4.177  6.486  7.573  6.068  6.796  11.13 

8.859  6.973  3.898  6.596  5.284  2.828  4.747  7.551  6.353  5.748  13.15 

8.263  6.456  5.796  5.545  4.694  1.66  7.632  8.527  7.874  8.625  12.3 

4.775  3.587  2.566  2.526  0.781  4.971  6.054  7.571  5.791  5.141  9.547 

2.092  1.184  0.45  0.863  2.395  7.947  6.002  7.537  5.431  4.751  8.835 
The measurement data of magnetic flux density
( 













0.829  0.923  0.413  0.505  0.52  0.715  1.152  1.399  1.492  1.219  1.008 

0.89  0.962  0.548  0.684  0.901  1.463  2.546  2.69  2.454  2.086  1.457 

1.034  1.103  0.396  0.628  0.97  2.862  6.336  5.973  5.905  4.995  3.356 

1.149  1.122  0.492  0.734  1.138  2.763  8.782  8.061  7.996  7.806  4.956 

1.375  1.348  1.033  1.229  1.399  1.516  3.847  4.5  4.576  4.322  3.268 

1.365  1.611  0.743  1.219  1.064  0.932  1.344  1.84  2.158  2.151  1.799 

1.539  1.746  0.967  1.599  1.493  1.083  0.984  1.254  1.844  2  1.76 

1.632  1.961  1.459  1.931  1.842  1.219  0.987  1.217  1.704  1.907  1.635 

1.631  2.477  1.904  2.035  1.759  1.177  0.991  1.378  1.998  2.032  1.555 

1.392  2.682  2.332  2.864  2.003  1.19  1.159  1.531  2.072  2.297  1.294 

1.71  2.925  2.377  2.313  2.352  1.577  1.272  1.998  2.523  2.389  2.227 

2.746  3.454  2.589  2.705  2.888  2.262  2.4  2.799  3.551  3.257  3.129 

2.056  3.789  3.287  3.029  3.467  2.798  2.608  2.881  3.044  3.107  3.314 

2.127  3.593  3.258  3.086  3.303  2.997  2.995  3.642  3.903  3.466  3.828 

2.514  3.533  3.284  3.071  3.153  3.494  4.577  4.997  3.475  4.692  4.131 

3.19  4.295  3.909  3.718  3.071  3.361  5.036  6.466  7.24  5.992  4.592 

3.693  5.221  4.375  4.268  2.855  3.039  5.573  7.664  8.264  6.707  4.711 

3.333  4.89  3.882  3.182  1.964  2.794  5.254  7.546  7.562  5.866  4.629 

3.349  4.779  3.626  3.182  2.694  3.568  6.023  7.699  7.339  5.809  5.347 

3.289  4.086  3.167  3.24  3.93  4.612  6.361  7.266  6.739  5.526  4.992 

2.96  3.559  2.971  3.187  3.144  4.245  6.199  6.804  6.671  5.431  3.621 

2.372  2.747  2.138  2.503  2.68  3.321  5.616  5.917  5.081  3.95  3.338 

1.853  1.998  1.771  2.057  2.189  2.826  3.6  4.814  3.414  1.261  3.084 

1.443  1.555  1.182  1.38  1.621  2.236  3.462  4.397  3.644  3.519  4.484 

1.025  1.006  0.74  0.806  2.119  1.026  2.169  3.976  4.804  4.624  5.628 

0.903  0.779  0.475  0.405  0.588  1.1  2.532  4.665  5.693  6.016  4.971 
Based on measurement data of Tables
Firstly, the surfaces and contours of
Surfaces and contours of measurement data for
According to the physical law of electromagnetic field distribution, the following considerations on the parameters setting can be concluded. In the
MLS approximation with linear basis function for
It is obvious that the surfaces and contours get smoother after fitting. The numerical results of MAE, maximum relative error (MRE), and RRMSE are shown in Table
Errors comparison between linear and quadric basis functions in MLS.
Field  Linear basis functions  Quadric basis functions  

MAE  MRE  RRMSE  MAE  MRE  RRMSE  














Therefore, the quadric basis functions can acquire more accurate approximation than the linear type. The time consuming for linear and quadric basis functions is 780 ms and 950 ms, respectively.
Then, we focused on the curve fitting for specific line measurement data. The magnetic flux density on the line
The influence of parameters
From Figure
The MLS approximation method for measurement data fitting was proposed in this paper. Numerical examples and measurement data fitting reveal the superior performance of MLS. The following conclusions can be made.
Firstly, the MLS can be regarded as a combination of WLS and SLS. The essences of MLS are the concept of moving window and compact support weighting functions. Compared to SLS, it realizes soft segment which avoids the fitting discontinuity problems and the fitting smoothness is guaranteed, while, compared to WLS, only the nodes that located in the support domain are involved for coefficients calculation; hence the locality is enhanced and can follow the rapid changes.
Then, the MLS approximation can acquire higher precision even with low order basis functions (e.g., linear basis). And also, MLS is stable for complex fittings because of its local approximation scheme, while oscillation phenomenon occurs for high order polynomials LS fitting.
Finally, there are weighting function parameters as influence radius
The authors declare that there is no conflict of interests regarding the publication of this paper.
This work was supported by the National Natural Science Foundation of China (no. 51377174).