An Adaptive Data-Driven Iterative Feedforward Tuning Approach Based on Fast Recursive Algorithm: With Application to a Linear Motor

The feedforward control can effectively improve the servo performance in applications with high requirements of velocity and acceleration. The iterative feedforward tuning method (IFFT) enables the possibility of both removing the need for prior knowledge of the system plant in model-based feedforward and improving the extrapolation capability for varying tasks of iterative learning control. However, most IFFT methods require to set the number of basis functions in advance, which is inconvenient to the system design. To tackle this problem, an adaptive data-driven IFFT based on a fast recursive algorithm (IFFT-FRA) is developed in this article. Explicitly, based on FRA, the proposed approach can adaptively tune the feedforward structure, which significantly increases the intelligence of the approach. Additionally, a data-based iterative tuning procedure is introduced to achieve the unbiased estimation of parameters optimization in the presence of noise. Comparative experiments on a linear motor confirm the effectiveness of the proposed approach.

T HE precision stages driven by the linear motors are widely employed in the equipment manufacturing fields where high velocity and high acceleration are required to improve the performance and quality of the motion control [1], [2]. The two-degree-of-freedom control strategy consisting of the feedback control and the feedforward control is a conventional control method to guarantee the achievable high requirements for the servo control performance. Since the closed-loop system bandwidth is usually limited by various reasons like the measurement bandwidth, the mechanical resonance, and so on, it quite challenges to improve performance by only relying on the feedback control. This fact necessitates introducing the feedforward control to lower the requirements for the feedback control loop and to improve the tracking performance [3], [4]. Many practical applications have been reported where feedforward control facilitates the performance improvement and relevant research can be summarized into the model-based feedforward [5], [6] and the iterative learning control (ILC) [7], [8], [9]. A relatively accurate model equaling to the inverse of the system plant is required in the model-based feedforward [10], which leads to its high dependence on both the model quality of the approximate model and the accuracy of the model-inversion. In the contrary, ILC requires less prior knowledge of the system plant and outperforms the model-based feedforward in applications executing repeated tracking tasks [11]. However, ILC is highly sensitive to the variations of the reference trajectory resulting in limitation of its application, whereas the model-based feedforward is with good extrapolation capabilities with respect to varying tasks. Taking into consideration of the relative merits of the two approaches, an iterative feedforward tuning (IFFT) method for fixed-structure feedforward controller has been established where basis functions are introduced in ILC [12], [13], [14]. The IFFT method is a data-driven control strategy where the feedforward controller design merely uses the input and output measurement data of the system and requires no model information about the controlled plant [15], [16]. Therefore, the IFFT approach including basis functions perfectly combines the advantages of the model-based feedforward and ILC, which eliminates the need for the approximate model of the plant inverse by exploiting results from the iterative tuning process [17].
Research about the IFFT method involving basis functions emerges in large numbers; since using this strategy, a tradeoff has been made between requiring no plant model and excellent extrapolation capability with respect to varying tasks. However, due to the existence of the measurement noise, it is essential in keeping the parameters estimation and even the cost function gradient estimation unbiased. To guarantee the unbiasedness of parameters estimation, there are diverse strategies reported in recent years. In [18] and [19], a data-based approach is utilized where the iterative tuning method supplies the unbiased estimation by executing multiple closed-loop experiments per iterative trial. In [20], the feedforward controller parameters and the disturbance observer parameters are simultaneously optimized by iterative tuning and the unbiased estimation is obtained through the data-based procedure, which is mentioned before. In the aforementioned literature, the effectiveness of the data-based approach is theoretically proved and the performances of the IFFT methods are experimentally evaluated. Except for the data-based methods, introducing the instrumental variables to the feedforward tuning has been proven to be very useful in closed-loop system identification and the experimental results confirm that this strategy can attain superior performance in the presence of noise [21]. Since the standard instrumental variable-based method was verified that leads to poor accuracy in terms of variance in [17] and [22], a refined instrumental variable approach is exploited to achieve optimal accuracy and simulation results as well as experimental results obtained on an industrial nanopositioning system confirm the practical relevance of the proposed method. Similarly, the unbiased estimation with zero asymptotic variances is achieved by the simultaneous use of the Kalman Filter and the instrumental variable approach in [23], and the experimental results obtained on a wafer stage demonstrate the theoretical results. The IFFT strategy with instrumental variables is also extended to combine with the high-order ILC [24] and the disturbance rejection control [25] to achieve better performance improvement.
Considering the aforementioned literature, it is noted that the number of the basis functions for the feedforward controller is required to be set before tuning for all the IFFT approaches, which is slightly in contradiction with no need for prior knowledge of the system plant. Sometimes, the order of the system plant is probably unknown or uncertain, which challenges the design of the IFFT scheme. This motivates the article to propose an adaptive data-driven IFFT approach that can adaptively tune both the parameters and the structure of the feedforward controller, which greatly increases the intelligence of the adaptive algorithm. Compared with the existing methods, the main contributions of this article are fourfold. First, an adaptive tuning framework is designed to autonomously select the number of the basis functions that is also the order of the feedforward controller during the iteration. Compared with the traditional IFFT or fixed-structure feedforward control methods [22], [26], the proposed tuning framework removes the need to set the structure of the feedforward controller in advance, which explores more possibilities to increase the intelligence of the algorithm and reduce the burden of the controller design. Second, a data-based iterative tuning procedure is presented to achieve the unbiased estimation of both the feedforward controller parameters and the optimization criterion in the presence of noise by executing two closed-loop experiments per iterative trial. Although the iterative procedure is involved, good extrapolation capability with respect to varying tasks is still guaranteed by introducing the basis functions into the feedforward structure, which improves the limitation of the traditional iterative methods [11], [27]. Third, to avoid the ill-condition matrix issue during the process of matrix inversion, the fast recursive algorithm (FRA) [28] is utilized to iteratively obtain the inversion of matrix in the expression of the optimization criterion. The FRA method is also a forward construction that facilitates adding the candidate basis functions one by one, which is an important part of the adaptive tuning framework for adaptive tuning the structure of the feedforward controller. Finally, an application to a linear motor is implemented to compare the proposed approach with the IFFT method [18] and the IFFT method with optimal instrumental variables [17].
The rest of the article is organized as follows. The problem statement is formulated in Section II. The adaptive IFFT approach based on the fast recursive algorithm (IFFT-FRA) is investigated in Section III. Simulation and experimental results are presented with discussions in Section IV. Finally, Section V draws the conclusion.

A. Two-Degrees-of-Freedom Control
The two-degrees-of-freedom control configuration widely applied to high-precision motion stages is shown in Fig. 1, where r denotes the system reference trajectory, y and y r denote the measured system displacement and the real system displacement, respectively, u denotes the system control signal, and n denotes the measurement noise. C fb is the feedback controller, P is the plant model, and C ff is the feedforward controller. θ is the feedforward controller parameter vector to be tuned.
According to Fig. 1 without consideration of the iteration, it holds where S is the sensitivity function with expression of S = (1 + P C fb ) −1 and T is the complementary sensitivity function with expression of T = SP C fb . Introducing the iterative process to the above equations, it can obtain as follows: Equation (2) can be rewritten as where ΔC and Δn (j) = n (j) − n (j−1) . So, in order to make e (j) = 0, it follows

B. Feedforward Controller Parameterization
The feedforward controller C (j) ff (θ) can be parameterized as According to (5), (4) can be rewritten as where H = SP r · Ψ and θ (j) = θ (j−1) + Δθ (j) . According to the least-square method, the solution of (6) is Thus, the parameters of the feedforward controller can be iteratively tuned by (7).

C. Research Objective
However, due to the existence of the measurement noise n (j) , it is obviously seen that the solution in (7) is not unbiased. The biased result of the parameter estimation could result in suboptimal feedforward compensation performance, which decreases the effectiveness of the feedforward strategy. Additionally, the above method needs to select the basis functions ψ i , i = 1, 2, . . . , k in advance, so it requires to know the approximate structure of the system plant, which is inconvenient for system design. Therefore, for the feedforward controller expressed as (5), it is essential for the practical applications to design an effective tuning method to adaptively select the basis functions. To respond the contributions of this article, the specific research objectives are listed as follows.
1) Develop a tuning procedure to adaptively tune the structure of the feedforward controller, i.e., to achieve the function of selecting the basis functions. 2) Design unbiased estimation for controller parameters θ.
3) Achieve better extrapolation capability for varying tasks, i.e., improve the tracking performance for varying tasks.

III. DATA-BASED IFFT APPROACH BASED ON FRA
In light of the limitations of the conventional IFFT method as discussed in Section II, an IFFT-FRA approach is developed, which exploits a data-based iterative tuning procedure to achieve the unbiased estimation of the feedforward parameters and the optimization criterion and is based on FRA to adaptively tuning the structure of feedforward controller.

A. Data-Based Iterative Tuning Scheme
Due to the unknown real value of SP , H needs to be replaced by an estimated value. Furthermore, the influence of noise on parameter estimation needs to be eliminated. Therefore, a data-based iterative tuning scheme where two experiments are executed per iterative trial is proposed in this section. For the jth iteration, in presence of noises n (j−1) (1) and n (j−1) (2) , using the same control signal u (j−1) , two experiments are executed to obtain the position outputs y (j−1) (1) and y (j−1) (2) , respectively, and the position errors e (j−1) (1) and e (j−1) (2) , respectively. In this article, the subscripts (1) and (2) To keep the unbiasedness of the estimation result, assumptions need to be stated as follows. Based on the two assumptions, the following theorem can also be obtained.
Assumption 1: The measurement noise n is zero mean. Assumption 2: The samples of the noise n are independent of each other.
Remark 1: Assumption 1 and Assumption 2 are both mild and easy to be satisfied in practice [19], [22].
Theorem 1: Under the above assumptions, the unbiased estimation of the feedforward controller parameters can be constructed as where and E[·] denotes the operation to obtain solution to the mathematical expectation. Proof: According to (8) and (6), it follows (1) . (12) Multiplying both sides of (12) by H (j)T (2) , it can be deduced as According to Assumption 1, Assumption 2 and (9), it follows Combining (13) and (14), it can be obtained as Then, the unbiased estimation Δθ (j) (1) shown as the first equation in (11) can be deduced based on the above result. The derivation principle of Δθ

B. Adaptive Tuning for Feedforward Structure
To adaptively tune the structure of the feedforward controller, the number of the basis functions k is introduced into the iterative tuning procedure. First, the candidate pool of basis functions can be set to include as many orders as possible in advance. For jth iteration, there are already basis functions with a number of (k − 1) and the kth basis function is to be selected. Then, the feedforward controller can be expressed as C where H After selecting the k basis function, (11) is used to obtain the parameter estimation results and the position error estimation iŝ The optimization criterion of both estimating the parameters and adaptively tuning the feedforward structure can be defined as (2) .

Theorem 2:
The optimization criterion is unbiased with the expression of (1) .
Proof: According to (19), J k can be rewritten as .
Considering the first item of the right side in (21), it can be deduced as where e r is the position error caused by the reference trajectory, e n is the position error caused by the noise and its subscripts (1) or (2) denote experiment index within a single iteration.
Considering the second item of the right side in (21), it can be deduced as Similarly, it holds Substituting (22), (23), (24), and (25) into (21), J (j) k can be rewritten as Then, J k is actually the same as Therefore, Theorem 2 is proved. Using the optimization criterion shown in (19) and (20), the proposed approach can determine whether to select the kth basis function or not and the detailed steps involved in the iterative adaptive tuning approach will be listed in the following sections.

C. Convergence Analysis
Since the proposed approach involves the iterative learning process, it is essential to analyze and discuss the convergence of the algorithm. First, (11) is rewritten to provide more convenience for the following analysis: From the algorithm setup, it can obtained that e (1) . Therefore, combining (10), (28), and (29), the following result can be obtained: According to (3), it follows Thus, substituting (30) into (31), it holds From the above expression, it can be found that (2) 2 Δw (j−1) + SΔn (j) is the error caused by the stochastic noise, which cannot be compensated for by the feedforward strategy and would not be considered when analyzing the convergence condition. Therefore, the convergence condition of the proposed approach can be expressed as Using H (j) (1) and H (j) (2) can usually guarantee that (34) holds in the practical applications where the signal to noise ratio is high enough, which can guarantee the convergence of the proposed algorithm.

D. Recursive Calculation for Obtaining Matrix Inversion
It is noted that there is matrix inversion to be obtained in (20). To avoid the ill-conditioned matrix issue when calculating , the recursive calculation method based on FRA needs to be deduced, which is detailedly described in this section. Based on the above analysis, there is a definition with the expression of Then, according to (16), it follows (2) .
Using the well-known matrix result for obtaining inversion of the block matrix [28], the corresponding expression is (2) .
Then, according to (35), if follows and it is defined that Finally, the inversed matrix result is (1) .

E. Summary of Data-Based IFFT-FRA Approach
Based on all the aforementioned results, the steps involved in the proposed data-based adaptive IFFT based on FRA (IFFT-FRA) approach are listed in Table I, which also contains the determination of the parameters and the basis functions in the proposed algorithm. It is noteworthy that the cut-off condition in the circulation procedure can be designed according to the practical demand.

IV. RESULTS
In this section, the theoretical results of the proposed IFFT-FRA approach are validated through numerical simulation for a two-mass spring damper system and experimental tests on a precision motion stage driven by a linear motor, respectively.

1) Simulation Setup:
To validate the proposed approach, a numerical simulation will be provided in this section to illustrate that the FRA-based adaptive tuning procedure can properly select the basis functions and effectively tune the feedforward controller structure. Consider the system plant given by where q denotes the forward shift operator with respect to time. Equation (42) corresponds a two-mass spring damper system widely researched in high-precision motion control [4], [29], [30]. The feedback controller is designed according to the loop shaping method and given by C fb = 2.697 × 10 5 q 2 − 5.362 × 10 5 q + 2.665 × 10 5 The measurement noise n is set as the Gaussian white noise with zero mean and the standard deviation λ ε = 2.5 × 10 −8 . The closed-loop system is excited by a fourth-order point-to-point reference signal as shown in Fig. 2. The reference trajectory is set with the displacement of 0.07 m, the maximum velocity of 0.25 m/s, the maximum acceleration of 10 m/s 2 , the maximum jerk of 1000 m/s 3 , and the maximum snap of 5 × 10 5 m/s 4 . The basis functions are defined as with the sampling time T s of 2 × 10 −4 s, which corresponds to the velocity feedforward, the acceleration feedforward, the jerk feedforward, the snap feedforward, and the third derivative of acceleration feedforward, respectively. The following parametrization is proposed to depict the ideal feedforward controller with the expression of with the true parameter vector given by θ = [15, 3.7995 × 10 −5 ] T . It is noted that with the true θ, the feedfoward controller shown in (45) can perfectly describe the inversion of the system plant shown in (42).
To better illustrate the feedforward controller structure adaptive tuning strategy included in the proposed approach, the conventional IFFT method [18] and the IFFT method with optimal instrument variables (IFFT-OIV) [17] are selected as the comparative group. To provide a fair comparison, the completely same closed-loop system setup and reference trajectory are used in the numerical simulation to test the three methods. The unknown structure of the feedforward controller is set aŝ It is noted that with the above setup, the optimal tuning result can be defined as [θ 2 ,θ 4 ] T ⇒ θ and [θ 1 ,θ 3 ,θ 5 ] T ⇒ 0. For the comparative group, the initial parameter vector of θ is set as 0 5×1 . Additionally, for the proposed IFFT-FRA since the basis functions will be selected one by one, the parameter θ i related to the basis function, which is abandoned in the tuning process will be set as 0. With this setup, it will be more convenient to clearly observe and compare the parameter tuning results among the three methods. Moreover, Monte Carlo simulations are performed for numerical illustration, where the number of samples and the realizations are given by N = 2000 and M = 100, respectively.
2) Simulation Results: Under the same simulating conditions, IFFT, IFFT-OIV, and IFFT-FRA are performed for six iterations, respectively. To observe the parameter tuning results,  the feedforward controller parameter estimated results [θ 2 ,θ 4 ] are shown in Fig. 3 and some conclusions can be drawn. First, for the variance of the acceleration feedforward parameterθ 2 , IFFT-OIV significantly outperforms the other two methods and the proposed IFFT-FRA is slightly better than IFFT with the last iteration. On the other hand, for the variance of the snap feedforward parameterθ 4 , IFFT-FRA and IFFT-OIV is comparable and both these two methods are smaller than IFFT. Therefore, above observations confirm the effectiveness and the relatively good asymptotic parameter estimation accuracy of the proposed approach.
To more clearly illustrate the ability of the proposed method to tune the feedforward controller structure, the parameter estimated results [θ 1 ,θ 3 ,θ 5 ] are presented in Fig. 4. According to the algorithm setup, IFFT-FRA can set the parameter θ i related to the basis function, which is abandoned in the tuning process as 0. From Fig. 4, it can be found that IFFT-FRA obtains results of 0 for [θ 1 ,θ 3 ,θ 5 ] while the estimated results are still obtained with both IFFT and IFFT-OIV although they are small. The above results validate that IFFT-FRA can perfectly select the right basis functions while the other two methods cannot realize this function, which confirms the effectiveness of the proposed approach for tuning feedforward structure.
To further illustrate the accuracy of the parameter tuning results, an evaluation criterion d θ named the Euclidean distance is defined as (47) The Euclidean distance d θ can depict the distance between the true parameter value and the estimated parameter value in the multidimensional space, which is shown in Fig. 5. The conclusion can be drawn that both IFFT-OIV and IFFT-FRA are with great superiority of parameter tuning accuracy compared with IFFT. Furthermore, according to the partial enlarged view in Fig. 5, IFFT-FRA is with better performance than IFFT-OIV in aspects of minimum value, maximum value, median value, and quantile values, which further confirms the superiority of IFFT-FRA in improving parameter tuning accuracy.

1) Experimental Setup:
To better prove the effectiveness of the proposed approach, experiments were performed on a precision stage driven by a linear motor, where the experimental setup is shown in Fig. 6. The VxWorks is selected as the real-time operating system. The motion control card and the mainboard are integrated into a VME64x card cage from the German company ELMA. A commercial motor driver with the product model of Soloist CL is used, which can make the bandwidth of the current loop achieve 1500 Hz and which peak current is 10 A. To more conveniently verify the algorithm, a two-mass spring damper setup is installed on the linear motor mover. The linear motor platform is mounted on an air bearing with 400 kPa air pressure. The absolute displacement of the two-mass spring damper setup is composed of two parts, where the absolute displacement of the linear motor mover is measured by a linear encoder and the relative displacement between the linear motor mover and the two-mass spring damper setup is measured by an eddy current sensor. The linear encoder with analog output is from Heidenhain company, which is with the accuracy of 0.1 μm  TABLE II  PARAMETERS FOR TRAINING TRAJECTORY AND TESTING TRAJECTORY   TABLE III  PARAMETERS TUNING PROCESS OF IFFT-FRA after being subdivided by the IBV101 subdivided box. The eddy current sensor is from Micro-Epsilon and with the measurement accuracy of 0.2 μm. The sampling period is T s = 200 μs. The feedback controller C fb is a PI controller with a lead correction that is similar to (43).
In the experimental validation, there is a training trajectory and a testing trajectory used for tuning feedforward controller parameters and testing the tuned parameters, respectively. Their structures are the same as the reference trajectory in the simulation test as shown in Fig. 2 and their parameters are shown in Table II. In Fig. 6, it can be noticed that there are cables used for signal transmission. In practice, an aluminum flake is sandwiched between the cables to support the soft cables. However, the aluminum flake does introduce a low-frequency characteristic of about 7.5 Hz into the closed-loop system, which will significantly influence the tracking performance under the trajectories with high acceleration. Therefore, an input shaper is involved to adjust the reference trajectories and reduce the vibration of cables, which is with the frequency of 7.53296 Hz and the damping ratio of 0.001. Except for the above setup, the other setup for experimental validation is the same as that for simulation, including the candidate pool of basis functions.
2) Experimental Results: Similar to the simulation test, IFFT, IFFT-OIV, and the proposed IFFT-FRA are compared under the exactly same conditions and performed for five iterations. The parameter tuning process of IFFT-FRA is shown in Table III  and the final tuning results of IFFT and IFFT-OIV are shown in  Table IV.
First, Table III indicates that the acceleration-related, the velocity-related, and the snap-related basis functions were selected in a sequence through the IFFT-FRA algorithm. According to the control theory, it is known that the two-mass spring damper system exhibits the acceleration-related and snaprelated characteristics while the experimental platform cables introduce a velocity-related characteristic. Therefore, Table III   TABLE IV  FINAL PARAMETERS TUNING RESULTS OF IFFT AND IFFT- fully verifies that the IFFT-FRA is with the ability to adaptively and properly tuning the structure of feedforward controller, whereas Table IV shows that with redundant basis functions both IFFT and IFFT-OIV cannot tell whether a particular basis function is needed and the data-driven procedure enables them to fit all the parameters regardless of the reasonability. In other words, IFFT and IFFT-OIV took the measurement noise as useful information to fit the feedforward controller parameters when the characteristics of the controlled object are priorly unknown and the feedforward controller is with redundant basis functions, which leads to an overfitting issue. The overfitting for the measurement noise undoubtedly causes performance deterioration when a varying task is performed since the inaccurate feedforward output is involved. Therefore, the comparative results between Tables III and IV validate the ability of the proposed approach to adaptively tune the structure of feedforward, thereby avoiding the overfitting issue for the measurement noise.
To more clearly verify the proposed method, using the tuned feedforward controllers' parameters shown in Tables III and IV, the testing reference trajectory was performed and the comparative tuning results can be illustrated in terms of tracking errors and cumulative power spectrum (CPS), which is shown in Fig. 7. It is noted that the testing trajectory is with higher requirements than the training trajectory.
From Fig. 7, it can be observed that the proposed approach outperformed IFFT and IFFT-OIV in improving tracking performance, especially in the acceleration phase, deceleration phase, and their corresponding adjustment phase. The above observation indicates that using the feedforward controller tuned by IFFT-FRA better facilitates improving tracking performance than IFFT and IFFT-OIV, which further proves that the aforementioned overfitting issue in IFFT and IFFT-OIV leads to poor extrapolation capability for varying tasks and convincingly illustrates the effectiveness and the superiority of the proposed IFFT-FRA approach.
Furthermore, the statistical comparison under the testing reference trajectory among the three methods is reported here to further demonstrate the superiority of the proposed approach in improving the tracking performance, which is shown in Table V. The statistical comparison results present that the proposed approach is superior to the two other methods in terms of the peak error, the CPS, variance, and root mean square.

V. CONCLUSION
The main contribution of this brief lies in the proposal of an adaptive data-driven IFFT approach based on the fast recursive algorithm for synchronously tuning both the structure and the parameters of the feedforward controller. The simulation results fully confirm the ability of the proposed approach to properly tune feedforward structure and significantly improve parameter tuning accuracy. The experimental results indicate that using the proposed approach a better tradeoff is made between requiring less prior knowledge of the system plant and improving the extrapolation capability with respect to varying tasks. Moreover, the above results reveal that adopting the proposed approach increases the intelligence of the algorithm and reduces the labor cost of designing the controller to some extent, which is attractive for practical applications. Due to the presence of the external disturbance in practice, the proposed control scheme can be extended to tuning the feedforward controller and simultaneously solving the influence caused by disturbance as well. Additionally, the proposed feedforward tuning approach only investigated the parameters and structure tuning for the feedforward controller with the structure expressed as (5). The feedforward controller with the rational basis functions will quite challenge the proposed approach, which is expected to be solved in future works.