# Measurement Data Fitting Based on Moving Least Squares Method

Authors: Huaiqing Zhang; Chunxian Guo; Xiangfeng Su; Chuanbao Zhu
Journal: Mathematical Problems in Engineering
 (2015)

---

## Abstract

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.


---

## Body

## 1. Introduction

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 [1], rational functions [2], Gaussian, exponential, smoothing spline in curve fitting, the B-spline [3], the nonuniform rational B-splines (NURBS) [4], Bézier surfaces [5], and radial basis function [6] in surface construction. And, simultaneously, the deformations of LS as RLS (recursive least squares), TLS (total least squares), PLS (partial least squares), WLS (weighted least squares), GLS (generalized least squares), and SLS (segmented least squares) have been also put forward. However, all the above LS based methods are global approximation schemes which are not suitable for large amount of data, irregular or scattered distribution cases. So the moving least squares (MLS) method which is local approximation was proposed in measurement data processing.The MLS approximation was introduced by Lancaster and Salkauskas for surface generation problems [7]. It has been used for surface construction with unorganized point clouds [8], regression in learning theory [9], and sensitivity analysis [10]. However, the major applications of MLS are to form a lot of meshless methods [11], as the diffuse element method (DEM) [12], the well-known element-free Galerkin method (EFGM) [13], and the meshless local Petrov-Galerkin method [14]. These kinds of methods have high computational precision and stability. The disadvantage of the MLS lies in the algebra equations system that is sometimes ill-conditioned, so Cheng and Peng [15] proposed the improved method. The error estimates and stability of MLS [16–19] and the variation as complex or Hermite [20, 21] were intensively discussed. On the whole, the researches of MLS approximation theory are much less than applications.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 Section2, a brief description is given for MLS approximation. Then, the weighting function is discussed in Section 3. In Section 4, the numerical examples of curve fitting are carried out. And finally, the measurement data fitting for substation is implemented in Section 5. Conclusions are drawn in Section 6.


## 2. Moving Least Squares Approximation

In MLS, an arbitrary functionf(x) can be approximated by
(1)f^x=∑i=1mpixaix=pTxax,
where pi(x), i=1,2,…,m, are basis functions, m is the number of terms in basis functions, and ai(x) are the coefficients. The basis functions p(x)=p1x,p2x,…,pmxT can be polynomials, Chebyshev polynomials, Legendre polynomials, trigonometric function, wavelet function, radial basis function, and so forth. For example, the basis functions of one-dimensional polynomials have the following forms: linear basis as pT(x)=[1,x], m=2 and quadratic basis as pT(x)=[1,x,x2], m=3. In the following, we consider one-dimensional curve fitting for demonstration.The obvious difference between the traditional LS method and MLS is the coefficients. For MLS, the coefficientsa(x)=a1x,a2x,…,amxT varied with x, while they are constant in LS. In order to determine the coefficients, a function which is similar to WLS is defined as
(2)J=∑I=1NwIxpxIa(x)-fxI2,
where f(xI), I=1,2,…,N, are the given nodes. wI(x) are the weighting functions with compact support which can be also represented as w(x-xI). The subscript “I” means the center of wI(x) is located in xI. The schematic diagram of weighted scheme in MLS is shown in Figure 1.Figure 1
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 (2) can be rewritten as
(3)J=Pa(x)-fTWPax-f,
where f=fx1,fx2,…,fxNT and P and W are
(4)P=pTx1pTx2⋮pTxNN×m=p1(x1)p2(x1)⋯pm(x1)p1(x2)p2(x2)⋯pm(x2)⋮⋮⋱⋮p1(xN)p2(xN)⋯pm(xN),W=w(x-x1)0⋯00w(x-x2)⋯0⋮⋮⋱⋮00⋯w(x-xN).
Minimizing (3) with the respect to coefficients a(x), the following expression can be obtained:
(5)∂J∂ax=PTWPax-PTWf=A(x)a(x)-B(x)f=0.
Further, the coefficients a(x) are
(6)ax=A-1xBxf,f^x=pTxax=pTxA-1xBxf=Φxf,
where Φ(x) is known as the MLS shape function which affects fundamentally the approximate performance. Hence, MLS can be regarded as a combination of WLS and SLS. The process of MLS approximation for one-dimensional case can be summarized in the following pattern.Flowchart for MLS Approximation Technique
(1)
Give the nodes (xi,f(xi)), i=1,2,…,N.
(2)
Select the basis functions p(x)=p1x,p2x,…,pmxT and then determine the matrix P in  (4).
(3)
Loop over every unknown point x and form the shape function.
(a)
Select weighting functionw(x).
(b)
Calculate the weight function ofx for N nodes and form the diagonal matrix W in (4).
(c)
Obtain the matrixesA(x) and B(x) using the formulae A(x)=PTWP and B(x)=PTW.
(d)
Calculate the inverse matrixA-1(x) by the SVD method.
(e)
Form shape functionΦ(x)=pTxA-1(x)B(x).
(4)
End unknown point loop.
(5)
Give the approximation function f^(x)=Φ(x)f.


## 3. Weighting Function

Weighting function plays a very important role in MLS. In the previous pattern, the vectorf is given and the matrix P is predetermined when specific basis functions are selected, and therefore they both are not relevant to the unknown point x and they just act as constant in forming shape function. Hence, only the matrix W is defined on x, and the shape function is mainly decided by the weighting function.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 Figure1 that a relative large support domain means more nodes are involved in calculation which is approaching the WLS method. While decreasing the support domain, the locality for the MLS will be enhanced, yet the smoothness declines. How to choose an appropriate support radius depends on the fitting errors, smoothness, and the problems’ own characteristics.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(7)w(r)=exp⁡(-r2β2)-exp⁡(-β2)1-exp⁡(-β2),r≤1,0,r>1,
where r=|x-xI|/dmi is the relative distance, dmi is the influencing radius, and β is shape parameter. Because the weighting function is only defined in the influencing domain, it is a compact support function. In addition, the fitting square error is weighted which just acts as a moving window. Hence, we have w(x,xi)=window(norm⁡(x-xi)/dmi) where the norm can be selected as Euclidean distance. In two- or three-dimensional cases, the distance is norm(x-xi)=x-xI2+y-yI21/2 or norm(x-xi)=x-xI2+y-yI2+z-zI21/2. The cubic spline weighting function is
(8)w(r)=23-4r2+4r3,r≤12,43-4r+4r2-4r33,12<r≤1,0,r>1.There are two adjustment parameters asdmi and β in Gaussian function whereas there is only dmi for cubic spline. And, correspondingly, the Gaussian is very flexible for MLS and is adopted in the following discussion. Gaussian and cubic spline functions are shown in Figure 2, and the cubic spline function is amplified by 1.5 in order to facilitate the comparison. Numerical tests show that the Gaussian function is similar to cubic spline when β=2.4.Figure 2
Weighting functions in MLS.Consequently, we can conclude the following in MLS.(1)
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 ill-conditioned problems. Therefore, in two- or three-dimensional cases, only lower order polynomials are preferred.(2)
For parameter setting in Gaussian weighting function, the influencing radiusdmi is the key issue. The larger radius means better fitting smoothness, yet with more computation cost. And, also, the larger shape parameter β means the locality is enhanced while smoothness declines.


## 4. Numerical Example

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(9)f1x=sin2πx+0.5cos⁡6πx+π4,x∈0,1,f2x=11+25x2,x∈-1,1.
The white noise with SNR = 20 dB is added to the above functions. The maximum of noise is about 0.2216 and 0.1264 in the above two cases. The original functions and corresponding noisy data are shown in Figure 3.Test functions and noisy data.
(a)
(b)Parameter Settings. The interval is h=0.01 in the above functions. (1) For the first fitting, dmi and β are set as dmi=20h and β=3.0. The MLS basis functions are pT(x)=[1,x,x2], m=3. The polynomials in LS are chosen as the best one as f^(x)=a1+a2x+⋯+a9x8. (2) For the second fitting, only dmi is changed to dmi=30h. The comparisons of curve fitting are shown in Figure 4.Fitting curves comparison between MLS and LS.
(a)
(b)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(10)RRMSE=∑i=1Nfxi-f^xi2∑i=1Nf2xi.
The numerical results reveal that the maximum error (MAE) and RRMSE in the first fitting are 1.3169E-1, 5.2938E-2 for MLS and 6.1063E-1, 2.1017E-1 for LS, respectively. For the second fitting, the corresponding results are 2.4150E-2, 3.0244E-2 for MLS and 1.4774E-1, 1.5090E-1 for LS. The time consuming for the MLS and LS is corresponding to 93.5 ms and 10.8 ms. Finally, a series of experiments are implemented for different MLS and LS settings. The numerical results are listed in Table 1.Table 1
Error comparisons between MLS and LS.
Functions
MLS
LS
Linear basis (m=2)
Cubic basis (m=4)
Sixth-order polynomials
Fourth-order polynomials
MAE
RRMSE
MAE
RRMSE
MAE
RRMSE
MAE
RRMSE
f
1
(
x
)
2.3232
E
-
1
1.5009
E
-
1
1.1025
E
-
1
5.3446
E
-
2
5.3237
E
-
1
3.7950
E
-
1
5.7938
E
-
1
4.1733
E
-
1
f
2
(
x
)
9.4027
E
-
2
6.2737
E
-
2
2.4193
E
-
2
3.0414
E
-
2
2.1870
E
-
1
2.2297
E
-
1
3.3344
E
-
1
3.2989
E
-
1


## 5. Measurement Data Fitting

In this section, the electric field intensityE and magnetic flux density B of a 500 kV substation were measured. The measurement points are uniformly distributed in the domain of 125 m × 50 m with interval h=5 m. So the total measurement points are 26×11=286. The schematic diagram of points’ distribution is shown in Figure 5.Figure 5
Measure points’ distribution in 500 kV substation.The corresponding measurement data ofE and B are shown in Tables 2 and 3.Table 2
The measurement data of electric field intensityE  (kV/m).
(x, y)/m
y
=
0
y
=
5
y
=
10
y
=
15
y
=
20
y
=
25
y
=
30
y
=
35
y
=
40
y
=
45
y
=
50
x
=
0
4.949
3.277
2.347
3.23
4.112
3.615
4.316
2.903
3.569
4.801
5.473
x
=
5
6.797
5.301
4.485
5.788
6.485
5.945
6.467
6.548
6.227
7.038
9.313
x
=
10
5.612
4.686
4.24
6.243
6.281
5.435
8.081
7.618
7.579
7.984
7.909
x
=
15
2.152
1.307
3.431
5.155
4.385
4.334
5.504
5.864
5.78
6.211
7.121
x
=
20
1.751
2.802
4.571
5.501
4.268
1.798
3.929
3.343
6.646
8.955
5.446
x
=
25
5.462
4.854
6.211
6.829
7.205
6.144
3.186
3.889
6.135
6.167
6.787
x
=
30
4.791
4.184
5.969
8.217
9.332
5.625
4.492
4.57
6.242
8.215
9.666
x
=
35
1.804
4.701
4.918
7.875
6.825
2.389
4.218
5.613
5.093
8.519
10.84
x
=
40
4.829
6.525
5.528
7.087
5.527
4.284
4.377
7.031
6.907
7.782
10.2
x
=
45
9.263
10.15
10.81
8.395
8.305
2.93
10.63
9.105
10.26
11.07
9.338
x
=
50
9.487
3.081
6.437
8.27
8.213
6.467
9.992
8.564
8.012
9.816
11.5
x
=
55
12.93
10.87
9.811
9.748
11.15
7.88
11.49
8.632
10.26
13.2
13.38
x
=
60
10.87
8.478
5.087
8.386
8.919
7.857
7.27
6.813
5.774
6.735
12.87
x
=
65
9.77
3.571
5.102
7.923
8.048
7.049
6.839
6.73
6.028
7.398
13.34
x
=
70
9.21
8.824
9.278
10.13
9.922
4.093
9.181
7.557
9.081
11.72
14.2
x
=
75
7.484
7.209
8.727
9.804
9.198
4.547
6.29
6.197
6.387
8.708
12.87
x
=
80
6.486
5.893
4.438
7.916
7.709
4.464
4.973
5.132
5.46
7.527
10.07
x
=
85
6.453
6.077
3.573
5.424
4.939
4.408
4.336
4.926
3.78
4.337
6.833
x
=
90
10.55
9.301
7.643
7.029
7.144
5.988
8.715
7.662
7.267
7.548
7.905
x
=
95
9.761
10.3
8.221
8.272
7.264
3.85
9.635
9.294
7.918
8.52
8.154
x
=
100
10.91
10.32
9.822
9.683
10.01
3.887
9.962
9.198
9.145
9.494
9.047
x
=
105
9.75
7.933
5.084
7.867
7.022
4.177
6.486
7.573
6.068
6.796
11.13
x
=
110
8.859
6.973
3.898
6.596
5.284
2.828
4.747
7.551
6.353
5.748
13.15
x
=
115
8.263
6.456
5.796
5.545
4.694
1.66
7.632
8.527
7.874
8.625
12.3
x
=
120
4.775
3.587
2.566
2.526
0.781
4.971
6.054
7.571
5.791
5.141
9.547
x
=
125
2.092
1.184
0.45
0.863
2.395
7.947
6.002
7.537
5.431
4.751
8.835Table 3
The measurement data of magnetic flux densityB  (μT).
(x, y)/m
y
=
0
y
=
5
y
=
10
y
=
15
y
=
20
y
=
25
y
=
30
y
=
35
y
=
40
y
=
45
y
=
50
x
=
0
0.829
0.923
0.413
0.505
0.52
0.715
1.152
1.399
1.492
1.219
1.008
x
=
5
0.89
0.962
0.548
0.684
0.901
1.463
2.546
2.69
2.454
2.086
1.457
x
=
10
1.034
1.103
0.396
0.628
0.97
2.862
6.336
5.973
5.905
4.995
3.356
x
=
15
1.149
1.122
0.492
0.734
1.138
2.763
8.782
8.061
7.996
7.806
4.956
x
=
20
1.375
1.348
1.033
1.229
1.399
1.516
3.847
4.5
4.576
4.322
3.268
x
=
25
1.365
1.611
0.743
1.219
1.064
0.932
1.344
1.84
2.158
2.151
1.799
x
=
30
1.539
1.746
0.967
1.599
1.493
1.083
0.984
1.254
1.844
2
1.76
x
=
35
1.632
1.961
1.459
1.931
1.842
1.219
0.987
1.217
1.704
1.907
1.635
x
=
40
1.631
2.477
1.904
2.035
1.759
1.177
0.991
1.378
1.998
2.032
1.555
x
=
45
1.392
2.682
2.332
2.864
2.003
1.19
1.159
1.531
2.072
2.297
1.294
x
=
50
1.71
2.925
2.377
2.313
2.352
1.577
1.272
1.998
2.523
2.389
2.227
x
=
55
2.746
3.454
2.589
2.705
2.888
2.262
2.4
2.799
3.551
3.257
3.129
x
=
60
2.056
3.789
3.287
3.029
3.467
2.798
2.608
2.881
3.044
3.107
3.314
x
=
65
2.127
3.593
3.258
3.086
3.303
2.997
2.995
3.642
3.903
3.466
3.828
x
=
70
2.514
3.533
3.284
3.071
3.153
3.494
4.577
4.997
3.475
4.692
4.131
x
=
75
3.19
4.295
3.909
3.718
3.071
3.361
5.036
6.466
7.24
5.992
4.592
x
=
80
3.693
5.221
4.375
4.268
2.855
3.039
5.573
7.664
8.264
6.707
4.711
x
=
85
3.333
4.89
3.882
3.182
1.964
2.794
5.254
7.546
7.562
5.866
4.629
x
=
90
3.349
4.779
3.626
3.182
2.694
3.568
6.023
7.699
7.339
5.809
5.347
x
=
95
3.289
4.086
3.167
3.24
3.93
4.612
6.361
7.266
6.739
5.526
4.992
x
=
100
2.96
3.559
2.971
3.187
3.144
4.245
6.199
6.804
6.671
5.431
3.621
x
=
105
2.372
2.747
2.138
2.503
2.68
3.321
5.616
5.917
5.081
3.95
3.338
x
=
110
1.853
1.998
1.771
2.057
2.189
2.826
3.6
4.814
3.414
1.261
3.084
x
=
115
1.443
1.555
1.182
1.38
1.621
2.236
3.462
4.397
3.644
3.519
4.484
x
=
120
1.025
1.006
0.74
0.806
2.119
1.026
2.169
3.976
4.804
4.624
5.628
x
=
125
0.903
0.779
0.475
0.405
0.588
1.1
2.532
4.665
5.693
6.016
4.971Based on measurement data of Tables2 and 3, the surfaces of E and B over the measurement domain are constructed by MLS. Then, for a specific measurement line, the MLS for curve fitting is implemented.


### 5.1. MLS Approximation for Surface Construction

Firstly, the surfaces and contours ofE and B are drawn in Figure 6. The following can be seen from figures. (1) The electric field intensity varies very strongly compared to the magnetic flux density. The reason is that the electric field intensity is affected significantly by the substation equipment whereas it is less affected for magnetic flux density. So field quantity E owns sharp variation characteristics. (2) The surfaces and contours are constructed by linear interpolation. Thereby, the surfaces have relative steep changes, and the corresponding contours have poor smoothness. However, the real electromagnetic field distribution is actually continuous and smooth.Surfaces and contours of measurement data forE and B.
(a)
(b)
(c)
(d)According to the physical law of electromagnetic field distribution, the following considerations on the parameters setting can be concluded. In theE surface fitting, in order to follow the rapid changes in electric field, a small influencing radius dmi and a larger shape parameter β are preferred. Hence, the smaller fitting errors are obtained at the expense of smoothness. But for B surface fitting, the radius dmi can be increased and the shape parameter β can be decreased. Therefore, a smoother fitting surface can be formed.Parameter Settings. The test points’ interval is chosen as ht=1 m over the measurement domain. The total test points are 126 × 51 = 6426. The linear basis functions as pT(x)=[1,x,y] and quadric basis functions as pT(x)=[1,x,y,x2,xy,y2] are adopted in MLS. The parameters are set as dmi=2h and β=4.0 in E surface fitting and dmi=3h and β=3.0 in B surface fitting. The fitting surfaces and contours of MLS with linear basis functions are shown in Figure 7.MLS approximation with linear basis function forE and B measurement data.
(a)
(b)
(c)
(d)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 Table4.Table 4
Errors comparison between linear and quadric basis functions in MLS.
Field
Linear basis functions
Quadric basis functions
MAE
MRE
RRMSE
MAE
MRE
RRMSE
E  (dmi=2h, β=4.0)
4.2914
E
-
1
2.5529
E
-
1
1.2459
E
-
2
7.4783
E
-
2
8.9646
E
-
2
1.3847
E
-
3
B  (dmi=3h, β=3.0)
2.7648
1.3219
1.0587
E
-
1
1.0298
4.8424
E
-
1
3.7737
E
-
2Therefore, 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.


### 5.2. MLS Approximation for Curve Fitting

Then, we focused on the curve fitting for specific line measurement data. The magnetic flux density on the liney=25 m is selected which is corresponding to the seventh column in Table 3.Parameter Settings. Choosing the test points’ interval ht=1 m: the quadric basis function is adopted in MLS approximation. The influencing radius dmi and shape parameter β have the following combinations. In Figure 8(a), the parameter β=3 is fixed and the radius dmi varied, while, in Figure 8(b), the radius dmi=3h is fixed and the shape parameter β varied.The influence of parametersdmi and β in MLS.
(a)
(b)From Figure8, we can conclude that (1) larger radius means smoother fitting but with larger fitting errors; (2) larger shape parameter means the ability of following rapid changes is enhanced and smoothness declines; (3) the effect of influencing radius is obvious compared to that of shape parameter. However, the fitting can be easily adjusted by setting the Gaussian function parameters.


## 5.1. MLS Approximation for Surface Construction

Firstly, the surfaces and contours ofE and B are drawn in Figure 6. The following can be seen from figures. (1) The electric field intensity varies very strongly compared to the magnetic flux density. The reason is that the electric field intensity is affected significantly by the substation equipment whereas it is less affected for magnetic flux density. So field quantity E owns sharp variation characteristics. (2) The surfaces and contours are constructed by linear interpolation. Thereby, the surfaces have relative steep changes, and the corresponding contours have poor smoothness. However, the real electromagnetic field distribution is actually continuous and smooth.Surfaces and contours of measurement data forE and B.
(a)
(b)
(c)
(d)According to the physical law of electromagnetic field distribution, the following considerations on the parameters setting can be concluded. In theE surface fitting, in order to follow the rapid changes in electric field, a small influencing radius dmi and a larger shape parameter β are preferred. Hence, the smaller fitting errors are obtained at the expense of smoothness. But for B surface fitting, the radius dmi can be increased and the shape parameter β can be decreased. Therefore, a smoother fitting surface can be formed.Parameter Settings. The test points’ interval is chosen as ht=1 m over the measurement domain. The total test points are 126 × 51 = 6426. The linear basis functions as pT(x)=[1,x,y] and quadric basis functions as pT(x)=[1,x,y,x2,xy,y2] are adopted in MLS. The parameters are set as dmi=2h and β=4.0 in E surface fitting and dmi=3h and β=3.0 in B surface fitting. The fitting surfaces and contours of MLS with linear basis functions are shown in Figure 7.MLS approximation with linear basis function forE and B measurement data.
(a)
(b)
(c)
(d)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 Table4.Table 4
Errors comparison between linear and quadric basis functions in MLS.
Field
Linear basis functions
Quadric basis functions
MAE
MRE
RRMSE
MAE
MRE
RRMSE
E  (dmi=2h, β=4.0)
4.2914
E
-
1
2.5529
E
-
1
1.2459
E
-
2
7.4783
E
-
2
8.9646
E
-
2
1.3847
E
-
3
B  (dmi=3h, β=3.0)
2.7648
1.3219
1.0587
E
-
1
1.0298
4.8424
E
-
1
3.7737
E
-
2Therefore, 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.


## 5.2. MLS Approximation for Curve Fitting

Then, we focused on the curve fitting for specific line measurement data. The magnetic flux density on the liney=25 m is selected which is corresponding to the seventh column in Table 3.Parameter Settings. Choosing the test points’ interval ht=1 m: the quadric basis function is adopted in MLS approximation. The influencing radius dmi and shape parameter β have the following combinations. In Figure 8(a), the parameter β=3 is fixed and the radius dmi varied, while, in Figure 8(b), the radius dmi=3h is fixed and the shape parameter β varied.The influence of parametersdmi and β in MLS.
(a)
(b)From Figure8, we can conclude that (1) larger radius means smoother fitting but with larger fitting errors; (2) larger shape parameter means the ability of following rapid changes is enhanced and smoothness declines; (3) the effect of influencing radius is obvious compared to that of shape parameter. However, the fitting can be easily adjusted by setting the Gaussian function parameters.


## 6. Conclusions

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 radiusdmi and shape parameter β which means the fitting can be easily adjusted by tuning above parameters. The MLS method is much more flexible than traditional LS based methods. So the MLS is a promising method for measurement data processing.



---

*Source: 195023-2015-01-20.xml*