## 2 The Coarse-to-Fine Free-Form Surface Machining Error Decomposition and Compensation Process
### Principle of Machining Error Decomposition from Coarse to Fine  
#### 2.3.1 Principle of the VMD Algorithm  
[PERSON] et al. [24] proposed the VMD algorithm, which is essentially the construction and solution of variational models. The algorithm is based on the mathematical theories of Wiener filtering, Hilbert transform and frequency mixing and aims to decompose a real-valued analyzed signal into \(K\) IMFs by nonrecursive filtering, which compensates for the shortcomings of cyclic recursive filters. It also has good results in processing nonlinear and nonsmooth signals. The algorithm flow of VMD is as follows [25]. 1. Construction of constrained variational models  
It is assumed that the original signal is decomposed into \(K\) IMF components, each of which is a narrow-bandwidth signal distributed near the center frequency. The constrained variational model is constructed depending on the sparsity of the narrow-bandwidth components in the frequency domain, and the original signal is equal to the sum of all the IMF components. This constrained variational model can be expressed by  
\[\left\{\begin{aligned} \min\limits_{\{u_{k}\},\{\omega_{k}\}} \left\{ \begin{aligned} \sum\limits_{k=1}^{K}\left\|\partial_{t} \left[\left(\delta(t)+\frac{j}{\pi t}\right)\ast u_{k}(t)\right]e^{-j\omega kt }\right\|_{2}^{2}\right\}\\ s.\ t.\ \sum\limits_{k=1}^{K}u_{k}=x\end{aligned} \right. \tag{3}\]  
where \(x\) is the original signal, \(u_{k}\) corresponds to the \(K\) IMF components, \(\partial_{t}(\cdot)\) is the partial derivative with respect to time \(t\), \(\delta(t)\) is the Dirac distribution with respect to time \(t\) and \(\omega_{k}\) is the center frequency of \(u_{k}(t)\). 2. Solution of the constrained variational model  
First, the constrained variational model is reconstructed by introducing a quadratic penalty factor and a Lagrange multiplier term. The quadratic penalty is a classic way to encourage reconstruction fidelity, typically in the presence of additive i.i.d. Gaussian noise. The weight of the penalty term is derived from such a Bayesian prior to be inversely proportional to the noise level in the data. On the other hand, Lagrangian multipliers are a common way of enforcing constraints strictly. The combination of the two terms thus benefits both from the nice convergence properties of the quadratic penalty at finite weight and the strict enforcement of the constraint by the Lagrangian multiplier. The quadratic penalty term allows the algorithm to converge quickly and improve the model reconstruction accuracy, and the Lagrange multiplier term transforms the constrained variational model into an unconstrained variational model. The reconstructed unconstrained variational model can be expressed by\[L(\{u_{k}\},\{\omega_{k}\},\lambda)= \alpha\sum\limits_{k=1}^{K}\left\|\partial_{t}\left[\left(\delta(t) +\frac{j}{\pi t}\right)\ast u_{k}(t)\right]e^{-j\omega_{k}dt}\right\|_{2}^{2}+ \tag{4}\] \[\left\|x(t)-\sum\limits_{k=1}^{K}u_{k}(t)\right\|_{2}^{2}+\left< \lambda(t),x(t)-\sum\limits_{k=1}^{K}u_{k}(t)\right>\]  
where \(L(\cdot)\) is the Lagrange function, \(\alpha\) is the quadratic penalty factor and \(\lambda(t)\) is the Lagrange multiplier term. Second, the optimal solution of Equation (4) is searched by an iterative method in the frequency domain, and each IMF component and its corresponding center frequency are updated iteratively according to the alternating direction method of multipliers (ADMM), where the IMF component update equation can be expressed by  
\[u_{k}^{(n+1)}(\omega)=\frac{x(\omega)-\sum\limits_{k=1}^{K}u_{k}^{(n+1)}( \omega)+\sum\limits_{k=1}^{K}u_{k+1}^{n}(\omega)}{1+2\alpha(\omega-\omega_{k} ^{n})^{2}} \tag{5}\]  
where \(x(\omega)\) is the Fourier transform of \(x(t)\), \(u_{k}^{(n)}(\omega)\) is the nth iteration of \(u_{k}(t)\) in the Fourier time domain, \(\left\{\omega_{k}^{(n)}\right\}\) is the nth iteration of \(\omega_{k}\) and \(\omega\) is the frequency parameter.