Linearization of Recurrent-Neural-Network- Based Models for Predictive Control of Nano-Positioning Systems Using Data-Driven Koopman Operators

Recent studies have shown that the nonlinear dynamics of nano-positioning systems (e.g., piezo-electric actuators (PEAs)) can be accurately captured by recurrent neural networks (RNNs). One direct application of this technique is PEA system control for precision positioning: linearize the nonlinear RNN model and then apply model predictive control (MPC). However, due to the linearization approach commonly used (e.g., Taylor series), the control bandwidth and the control performance are quite limited as the obtained linear system is only guaranteed to be accurate within small neighborhood of the linearization point. To address this issue, we propose a Koopman operator-based approach for linearization and then use the obtained linear parameter-varying model for predictive control. This linearization scheme can significantly decrease the overall approximation error within the MPC prediction horizon, and thus, lead to improved tracking performance. The proposed approach was validated through two applications—trajectory tracking of PEA, and deformation control of polymers during atomic force microscope nano-indentation.

model [7], ferromagnetic material hysteresis model [8], have been used to compensate the nonlinearities. However, again, the modeling bandwidth is limited.
Recently, neural networks have been proposed for PEA system dynamics modeling [9], [10]. Among them, recurrent neural network (RNN) is the one that can model the nonlinear PEA dynamics with superior accuracy [10], and the control bandwidth of the nonlinear model predictive controller based on it can reach hundreds of Hz. However, this nonlinear model predictive controller is computationally costly and intractable since a nonlinear optimization problem (usually non-convex) has to be solved. Therefore, this paper is concerned with improving the computation efficiency of controllers based on RNN models.
Alternatively, the nonlinear optimization problem can be avoided through linearizing the original nonlinear system. Taylor series has been widely used in nonlinear system linearization [13]. However, the disadvantage is that the approximation accuracy is only guaranteed within small neighborhood of the linearization point. Therefore, the VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ modeling uncertainties will surge as the prediction horizon increases, and then limit the performance of MPC. Feedback linearization and flatness can also be used for linearization but they are not effective for general nonlinear systems [14], [15]. Other options include Carleman linearization, ''polyflow'', and Koopman operator approach [16]- [18]. Among these, only Koopman approach is data-driven [19], [20]. Koopman operator approach uses a finite number of functions (i.e., observations) to form the state of the linearized model, and is not restricted to the form of the nonlinear model. Data-driven Koopman model predictive control has been proposed for controlling nonlinear partial differential equations, where the nonlinear dynamics is linearized [21]- [23].
In this work, we propose to achieve precision positioning control using Koopman operator approach. Specifically, a discrete nonlinear system represented by a RNN is linearized using data-driven Koopman operator approach, and a predictive controller is designed based on the linearized model [21]. Instead of using a linear model to approximate the system nonlinear dynamics over the entire control process, only the dynamics in the future N p (i.e., prediction horizon) steps is approximated (i.e., linearized). In previous studies [21], [22], the computation load was not well considered and the sampling frequency was rather limited (e.g., 20Hz in [22]) as the dimension of the lifted space was high. However, for applications in which the sampling frequency needs to be high enough (at least kHz level), low-dimension lift space or low-order linear model has to be used. Moreover, based on the theoretical analysis on model predictive control stabilities [24], [25] and to make the controller more robust, large prediction horizon is usually preferred. However, the linearization accuracy decreases with both the increment of prediction horizon and/or the frequency of the input. There issues have been addressed in this work. We proposed to maintain the linearization accuracy through introducing a second linear model in the predictive controller. Specifically, the first linear model (generated with Koopman approach) will be used to compute the optimal inputs which provide the anchor for identifying the second model. For demonstration, the control performance of using single linear model and two linear models are compared with that of the Taylor approach in simulation.
To further demonstrate the efficacy of the proposed approach, it is used for positioning control of a PEA and deformation control of polymer in atomic force microscope (AFM) nano-indentation. The first task has been studied broadly with applications in aeroelastic control of aircraft wings, high-speed AFM imaging, and micro-additive manufacturing [26]- [28], and the second task is closely related to applications in soft robotics and biomechanics [29], [30]. The main contributions of this paper are: 1) we explained why the Koopman approach still works when the linear model has low order (i.e., the dimension of the lifted space is low), 2) a solution has been provided to deal with the surge in approximation error when the prediction horizon becomes large, 3) the proposed approach has been implemented for deformation control of materials which is very challenging for other controllers, 4) detailed comparison studies between Taylor approximation and Koopman approximation in terms of principles and computation efficiency have been conducted, which provided helpful information for controller design.

II. PRELIMINARIES
A. KOOPMAN OPERATORS Consider a system represented by a discrete model as (1) Define the system observation or output y k ∈ R m as y k = g(x k ). The Koopman operator K is defined as Therefore, the linearity of Koopman operator can be verified by The Koopman eigenfunction φ satisfies Kφ = λφ where λ is the corresponding eigenvalue. The evolution of the outputs can be expressed as a linear combination of infinite number of eigenfunctions. In practice, only a finite number of eigenfunctions will be used [31]. To analyze the non-autonomous system, the Koopman operator is extended to system with exogenous input as shown in Eq. (4) [21].
Let (u i ) ∞ k denote the input sequence starting from time k. Suppose x k ∈ X and u k ∈ U, define L = {(u i ) ∞ k |u i ∈ U}, the state space X is extended to X × L. Accordingly, the Koopman operator K for the system Eq. (4) is defined as With the newly defined Koopman operator (Eq. (5)), the established Koopman operator theories can be applied for the non-autonomous system Eq. (4).

B. RNN-BASED NONLINEAR DYNAMICS
RNN can be used to capture complex dynamics in theory given enough number of parameters. In this work, we consider the RNN represented by Eq. (6) which is used to model the dynamics of PEAs, where x k ∈ R N ×1 , u k , and y k are the system state, input and output at the sampling instant k, respectively [10]. Structure of the RNN model and how Eq. (6) can model the nonlinearities of the PEA system are detailed in [10].

C. LINEARIZATION WITH TAYLOR SERIES
Eq. (6) can be linearized with Taylor series. Note that Taylor approximation linearizes the system around a chosen fixed point and only guarantees the accuracy around it. Let h(x) = tanh(x). At the sampling instant k, Eq. (6) can be linearized at the fixed point (x k ,ū k ) as where By assuming that A k , B k , and M k remain fixed for the future N p (i.e., prediction horizon) steps, Eq. (7) can be used to predict the future inputs with unknowns [u k , u k+1 , · · · , u k+N p ].

A. LINEARIZATION BASED ON KOOPMAN OPERATORS
The extended dynamic mode decomposition (EDMD) algorithm proposed in [32] is used to linearize Eq. (6).
At the sampling instant k, the current state x k and input u k are known. The goal is to use Eq. (8) to model the dynamics in the future N p steps. Since the inputs for the future N p steps are unknown, one can try different input sequences (u i ) k+N p k to capture the dynamics of the system Eq. (4). For the following matrix, each row of U is a possible sequence of inputs for the next N p steps. With the ith row [u i,k , u i,k+1 , · · · , u i,k+N p ] as inputs to the nonlinear system Eq. (6), we can obtain the future states [x i,k+1 , x i,k+2 , · · · , x i,k+N p ]. Then z i,k can be constructed as follows.
By Eq. (8), we have z i,k+1 = Az i,k + BU i,k , where U i,k is the entry (i, k) of U. It follows that where U i is the ith row of U. For each i = 1, 2, · · · , m, a similar equation can be derived, and they can be combined as One can solve the following least-square optimization problem to obtain A and B.
The solution will be [A, B] = Z + Z −1 with Z −1 as the pseudoinverse of Z .
Note that if g 1 (x k ) = W 2 x k + B 3 , then dynamics of the linearized model in the future N p steps is as follows.
Remark 1. If we choose polynomials or other dictionary functions to define the observations as did in [22], m will usually be large. But in order to realize real-time control, m should be small. In the simulation, it turns out that when m is small, the form of observation functions does not affect the approximation accuracy too much on the condition that g i s are not linearly dependent. But it needs further investigations to determine the effects.
Remark 2. One special case is that the g i can be a linear function of x k , e.g., z k = Mx k for some invertible matrix M . Then Eq. (8) is equivalent to It seems that Eq. (15) is similar to Taylor approximation. However, it is still possible that Eq. (15) is better than Taylor approximation as the latter is optimal around the linearization point, while Eq. (15) is optimal in the sense that the prediction error over the future N p steps is minimum. Mathematically, for any other linear approximation M in the space of [x k , u k ], there exists > 0 such as that Taylor approximation is more accurate in the open ball B ([x k , u k ]) than M. In contrast, if z k = Mx k , the Koopman approach tries to solve the following optimization problem where z i andẑ i are measured and predicted values using Eq. (8), respectively. Eq. (16) is an approximation of minimizing the prediction error for the future N p steps of the following linear model, In other words, the model Eq. (15) may sacrifice some accuracy at the linearization point to achieve overall accuracy, which is illustrated by the simulation results in Fig. 1. To better demonstrate the difference between these two approaches, as an example, in Fig. 1, we performed linearization based on the Taylor approach and Koopman approach for the dynamical system x k+1 = x 2 k , respectively. Clearly, L1 is optimal locally at point A1 and L2 is optimal for the range between A1 and A2, and the superiority of L2 over L1 is more significant for the larger prediction horizon.

Remark 3.
Another important factor that may affect the approximation accuracy is the generation of U. The nonlinearity of the system Eq. (6) depends on the input u k , therefore, the range of u k defined as RG = max may determine how local the linear approximation is. In this work, U is randomly generated with the RG changes adaptively according to the trajectory to be tracked, i.e., U i,k is uniformly distributed in the range [−RG + u k , RG + u k ].
In particular, RG is set to be proportional toRG i.e., RG = ρ 1R G, whereRG = max k+1≤i≤k+N p r i − min k+1≤i≤k+N p r i is the range of the reference signal r k to be tracked in the future N p steps. If the inversion model G −1 (jω) is known, given any desired output − → R , the desired input − → U can be computed, where − → R and − → U are times series. Therefore, the input range will be , RG can be determined without ρ 1 . However, the inversion model is usually unavailable, inspired by how α is chosen for MIIFC law [3], ρ 1 can be set to the reciprocal of the estimated DC gain, i.e., ρ 1 = G −1 (0). With this strategy, the range of the generated input U changes adaptively with the reference signal in the future N p steps, which ensures that Koopman approach outperforms Taylor approximation for both high-frequency and low-frequency reference trajectory tracking.

B. PREDICTIVE CONTROL
In this section, MPC is reviewed first. Then how to incorporate two linear models to enhance the controller performance is presented.
The cost function to be minimized for MPC is where The objective is to minimize J under certain constraints, which is formulated as the following optimization problem where = S T H T HS + ρI and = S T H T E.
Note that Eq. (20) is derived based on the linearized model Eq. (14) obtained by using the Koopman linearization approach instead of the original nonlinear model Eq. (6), otherwise the obtained optimization problem will usually be non-convex and is hard to solve.
There are two reasons for choosing large prediction horizon. One is based on the theoretical results on nonlinear model predictive control, large prediction horizon is needed to ensure closed-loop stability [24], [25]. Another reason is that by using large prediction horizon, the controller is more robust with the occurrence of disturbances, for example, if there is a disturbance at sampling instant k and if the prediction horizon is large enough, the objective function in Eq. (20) will not change too much. In the extreme case, if N p → ∞, the linear model will approximate the system dynamics over the entire time span instead of local dynamics resulting in large modeling errors.
On the other hand, for Eq. (6), the nonlinearity depends on u k , if the prediction horizon remains the same and the frequency of r k increases (usually the frequency of the desired input u k will increase accordingly), RG will increase. Recall that the prediction horizon N p means that N p points are sampled to represent the future input signal (the range of which is determined by RG) in time span of N p /f s where f s is the sampling time. Therefore, increment of RG results in the loss of sampling resolution, which will cause the modeling accuracy of Eq. (8) to decrease.
One possible way to address this issue is to add another linear model to approximate the dynamics, i.e., use two linear models to approximate the dynamic of the system for the future N p steps. The computation consumption may increase since the same optimization problem Eq. (20) has to be solved twice. The detailed algorithm is shown below.
First, at the sampling instant k, obtain the linear model with Koopman approach and solve the optimization problem Eq. (20). Then the solved optimal N p inputs are , and choose the step where the second linear model starts working. For instance, we can select the starting point at u * k+q with q = N p /2. Use the same procedure to obtain the second model with the starting point at [x k+q , u * k+q ]. Therefore, the dynamics in the future N p steps can be described with the following model.
Accordingly, the parameters G, F, and H should be modified as follows. The algorithm which incorporates the two linear models is summarized in Algorithm 1.
Remark 4. The purpose of introducing the second linear model is that in case N p is very large, the modeling uncertainty of the model Eq. (8) after q steps may be significant, using another linear model to account for the dynamics between the future q and N p steps can increase the overall linearization accuracy for the entire future N p steps. In Fig. 1, instead of using one line segment to approximate the curve A 1 A 2 , one can use two line segments to approximate A 1 A 3 and A 3 A 2 , respectively for the point A 3 between A 1 and A 2 on the curve. However, Algorithm 1. does not work completely in this way. The reason is that the case is different when linearizing a dynamical system, the difficulty lies in how to choose ''A 3 '' which depends on the future input u k+q . In Algorithm 1., after solving the optimization problem Eq. (20), the future input u k+q can be predicted, which will then be used to locate ''A 3 ''. However, since the prediction may not be accurate, the choice of q may affect the accuracy of Eq. (21).

IV. SIMULATION RESULTS
In the simulation, the RNN model [10] which captures the nonlinear dynamics of a PEA was used. All the simulation codes and data are available at GitHub.

A. EVALUATE THE LINEARIZATION ACCURACY
When evaluating the linearization accuracy, the input to the nonlinear system was pre-designed and thus no controller was involved. Specifically, Eq. (6) was linearized every N 1 = 20 sampling intervals, and for the following N 1 steps the same input was fed into the nonlinear system and the linearized system to compare the outputs. Input signals with different frequencies (12Hz, 137Hz, and 352.6Hz sinusoidal signal) were tested.
Two approaches-the Taylor approximation (Eq. (7)) and the Koopman approach (Eq. (8)) were compared. As an example, prediction errors in the time domain are shown in Fig. 2 for 137Hz sinusoidal input. The numerical comparison results are presented in Table. 1. Suppose the tracking error vector is E, 2-norm, ∞-norm, and variance of E are shown in Table. 1. The output for the future 20 steps are predicted. The size of U is 60 × 15 and RG = 0.5RG. For the observations in Koopman operator approach, g 1 = W 2 x k + B 3 and g i = W gi tanh(W gi x k + B gi ) +B gi , i > 1, whereW gi , W gi , B gi , and B gi were randomly generated.
From Table. 1, it can be seen that the Koopman linear model improved the prediction errors by at least 50% for all the three inputs compared to the Taylor approximation. As seen in Fig. 2, the Taylor approach can predict accurately at the points close to the linearization point, but the predicted values deviate away from the actual outputs at points far from the linearization point.
In addition, it is worthwhile to note that the prediction errors of the linear approach are not always lower than that of Taylor approximation for every point as shown in Fig. 2, considering that they may sacrifice the accuracies around the linearization point for better approximation accuracy over N p steps as explained in Remark 2.

B. PERFORMANCES OF PREDICTIVE CONTROL WITH DIFFERENT LINEARIZED MODELS
With the linearized system, predictive controller can be applied. The constraints on the input were ignored, however, they can be trivially added to the controller. We chose N p = 20 and ρ = 0.5. Koopman approach using single linear model is denoted by ''Koopman1'' in Table. 2 while the one with two linear models is called ''Koopman2''. The order of the linear model for Koopman approach was 15.
Overall, Koopman approach can eliminate the tracking error by at least 80% for all the trajectories as shown in Table. 2, as well as in Fig. 3. This improvement can be attributed to two factors. One is the linearization accuracy over the prediction horizon as validated in the previous subsection. Another reason is the strategy of dynamically changing the exploration range [−RG, RG] in which U was generated for obtaining the model parameters. This range will determine how local the dynamics is as explained in Remark 3. When tracking low-frequency trajectory (i.e., 13Hz), incorporating two linear models was not advantageous over the single linear model. But when the trajectory frequency was increased, ''Koopman2'' could improve the performance by about 50% compared to ''Koopman1''. This is due to the soaring prediction error for high-frequency input, thus introducing second linear model can mitigate the surging prediction errors.  Compared to the nonlinear predictive controller in [10], Koopman approach transforms the intractable nonlinear optimization problem to a tractable convex optimization problem while maintaining the tracking accuracy. The computation cost depends on the order of the linearized model. It is possible to use low order linearized model to ensure the control accuracy and computation efficiency, as is the case demonstrated in simulations here. Moreover, Koopman approach does not depend on the form of the nonlinear model which is just used for generating data, thus it can be easily applied on other nonlinear systems. Therefore, Koopman approach is more suitable for precision control provided that the nonlinear system model is available.

V. EXPERIMENTAL RESULTS
Due to the limited computation resources, the original system was linearized to one linear model for experimental demonstration. The experiment setup is shown in Fig. 4 including the AFM (BioScope Resolve, Bruker AXS Inc.) and the data acquisition system (DAQ) (NI PCIe-6353, National Instruments) installed in the workstation (Intel Xeon W-2125, RAM 32GB). The controller is designed and implemented with MATLAB Simulink Desktop Real-Time(MathWorks, Inc.). The controller diagram is the same as Fig. 3 in [10] except that the system is linearized here.
The tracking errors were computed using Eq. (24), where r(·) and y(·) are complex vectors obtained through discrete Fourier transform of the corresponding signals [3].

A. COMPUTATION EFFICIENCY
To measure the computation efficiency of each method, we count the number of basic operations (addition, subtraction, multiplication etc.) needed in one sample time to move forward. Suppose U is a K 1 by K 2 matrix. The orders of nonlinear model Eq. (6) and linearized model are N m and N l , respectively. As an example, we consider using one linear model which corresponds to lines 1-10 in Algorithm 1.. Lines 6-7 take time (K 1 K 2 N 2 m + N l N 2 m ). Lines 8-9 take time (2N 2 l + 2N 2 l K 1 K 2 ). Finally, the predictive controller part (line 10) takes (N h N 3 l ). Therefore, the total time consumed will be (τ 1 N 2 m + τ 2 N 2 l ) with τ 1 = K 1 K 2 + N l and For the Taylor approach, the algorithm can be described by line 10 alone in Algorithm 1. which takes (N h N 3 m ). According to [10], RNNPC takes (k2(N h − N c 2 )N c N 2 m ), where k is the number of iterations in gradient descent algorithm and N h and N c denote the prediction horizon and control horizon, respectively. PID is very efficient with (N m ). In contrast, due to the FFT and inverse FFT operations, MIIFC takes (2N d log(N d )) where N d is the number of points in the trajectory to be tracked.
From the time complexities listed above, one can see that N m and N l are very important since most quadratic and cubic terms depend on them. One advantage of the Koopman approach is that N l can be quite small compared to N m thus the computation efficiency is significantly improved. In Table. 3, these time complexities are evaluated with K 1 = 5, N h = 12 (for RNNPC N h = 8 is used), K 2 = N h = 12, N c = 6, N m = 20, N l = 8, k = 10, N d = 20000, which were also used in the experiment.
Note that in Table. 3, a controller is tractable if the optimization problem inside the controller can be solved with efficient algorithms. For example, for RNNPC, there exists no efficient algorithm to solve a non-convex optimization problem thus it is intractable. From Table. 3, it can be seen that the proposed method is more computationally efficient VOLUME 8, 2020  even with bigger N h compared with RNNPC. This superiority is more significant when the order of the original model N m is high.

B. OUTPUT TRACKING OF PEA
The frequency response of the PEA system is shown in Fig. 6. The model for the PEA, which consists of a low pass filter, a RNN, and a linear model with an error term (LME), was the same as the one used in [10]. Fig. 5 shows how the RNN model can capture the nonlinearities of the PEA system. Note that in Fig. 5, the modeling accuracy of RNN is relatively low at low frequency due to the limited length of the RNN training set for the concern of computation efficiency, that's why LME is used, the details can be found in [10]. As discussed in [10], LME was designed to account for the low frequency dynamics, however, combining LME with RNN directly will result in modeling error. Recently, it is shown that this issue can be addressed by adding extra dynamics G e as shown in Fig. 10. The readers are referred to [33] for the details. However, the approach in [33] would increase the model order, thus was not used in the experiment due to the limited computation resources. The sampling frequency was set as 10kHz. The modeling bandwidth was about 250Hz.
Note that the modeling bandwidth can be further improved by increasing the number of parameters in the neural network and the training frequency range, which, however, also indicates that more computation resources are needed for implementing the controller. For example, the computation efficiency of the proposed controller depends on the order of the RNN-model N m , more parameters in RNN results in In order to test the tracking performance for different trajectories, we generated low-frequency (30Hz), medium-frequency (100Hz), high-frequency (200Hz), and multiple-frequency ( (t) = [0.8 sin(2π5 t + 1.5π) + 0.43 sin(2π50t)+0.12 sin(2π120 t+1.2π)+0.3 sin(2π180t+ π)]/1.3) trajectories. In addition, since triangle signal is widely used in nano-positioning, we also tested triangle signals with frequencies of 50Hz and 100Hz, respectively.
As shown in Table. 4, the tracking errors of the Koopman approach are slightly larger than that of RNNPC especially for the high frequency trajectory tracking. Although solving the optimization problem is tractable after the model is linearized, there is no guarantee that this will improve the tracking performance especially with the existence of modeling uncertainty. The Koopman approach is advantageous over RNNPC if the model becomes more complex with more parameters or higher orders (demonstrated in the next task), in which case solving the optimization problem    is still tractable. Nonetheless, Koopman approach is much better than PID with the accuracy improved by at least 50% for all the trajectories as can be seen in Table. 4 and Fig. 7. Compared to MIIFC-an offline control approach, Koopman approach outperforms it at lower frequency range and becomes worse as the frequency goes high due to the modeling uncertainties. In Fig. 8, it can be seen that the tracking error curve of Koopman approach and Taylor approach have the same pattern, this is because both approaches try to linearize the nonlinear model but the obtained linear model is slightly different. In this case, the Koopman approach can achieve higher accuracy, which is also verified in Table. 4. In particular, when tracking high-frequency trajectories, the Koopman approach is more accurate as explained in the previous section. When tracking triangular trajectories as shown in Fig. 9, the tracking errors in Koopman approach originate from the unmodeled high-frequency dynamics at the high frequency peaks. But the overall tracking error is still tolerable, and better than the Taylor approach (See Table. 4).
Assuming that the prediction horizon N p remains the same, if the sampling time is 1/f s (then sampling frequency is f s .), then the time-span of the dynamics to be approximated will be N p · 1 f s , as f s increases, N p · 1 f s will decrease implying the dynamics to be approximated is more''local'' thus can be approximated using a linear model with higher accuracy. Therefore, increasing the sampling frequency and/or using two linear models (as aforementioned) can further improve the control performance.
Note that the performance of Koopman over Taylor is not as significant as that in simulation due to the following two reasons. First, the prediction horizon used in the experiment due to the limited computation resources is less than that used in simulation (12 vs. 20). Usually, when the prediction horizon is small, the linearization accuracy improvement of Koopman over Taylor approach is not significant as seen in Fig. 1. Second, the existing modeling uncertainties may affect the performance. For example, at the region where the modeling error is very large, then Koopman approach and Taylor approach may not differ too much. Nevertheless, Koopman approach can maintain the performance with significantly improved computation efficiency based on Table. 3, and as the modeling accuracy and prediction horizon increase, the superiority of Koopman approach will be more significant.

C. POLYMER DEFORMATION CONTROL IN AFM NANO-INDENTATION
Deformation control of soft materials is closely related to soft robotics and biomechanics applications.   The proposed approach was applied to control the deformation of a PDMS sample during AFM nano-indentation. As illustrated in Fig. 11, when the AFM probe indents a hard sample (thus the deformation can be ignored), the cantilever deflection d 1 should equal the AFM piezo displacement d [34]. For the same AFM piezo displacement d, if the sample is soft, the deflection d 2 satisfies d 2 < d, and the sample deformation can be calculated as δ = d − d 2 . Both the AFM piezo displacement and the cantilever deflection can be directly acquired from the AFM. Therefore, the input to the system is d and the output is δ. Note that it is very difficult to model the system since it consists of the AFM PEA dynamics and the complex deformation dynamics of the soft sample, and combining these two models will also induce modeling errors. Instead, we collected the input and output data to train a RNN to model the probe-sample interaction dynamics. The details of using RNN to model the system dynamics can be found in [10]. The modeling bandwidth was 0-120Hz with sampling frequency of 2.5kHz. Similarly, four reference trajectories were designed including sinusoidal signals (with frequencies of 1.3Hz, 37Hz, and 94.3Hz, respectively) and the 1 signal. 1 is similar to except the frequency components were [1, 10, 30, Fig. 12. However, the computation cost of the proposed approach is less than that of RNNPC-a nonlinear predictive control approach generally as shown in Table. 3. Compared to the offline controller-MIIFC, Koopman approach can decrease the tracking errors for all the trajectories. In particular, when tracking the high frequency trajectory (i.e., 94.3Hz) the tracking errors are decreased by about 50%. Similar to the previous experiment, Taylor approach didn't perform well especially when the trajectories contain high-frequency components (e.g., nad 94.3Hz sinusoidal signal).
Note that the polymer deformation process is very noisy which can be seen from the data during the first 0.01s in Fig. 12. Even when the input is zero, the output fluctuates due to the fluctuation of the sensor mounted on AFM and the probe-sample interaction dynamics. Therefore, controlling the deformation process is very challenging. For instance, it is very difficult to find a set of parameters for PID to control this process. On the other hand, MIIFC as an iterative learning control allows the existence of modeling uncertainties [3], however, as seen in Table. 4, the converged tracking error is still very high especially for tracking the 94.3Hz trajectory. In comparison, the proposed approach performs well, it con-  sumes less resources but can achieve very high accuracy compared to other controllers. Therefore, this experiment clearly demonstrated the robustness of the proposed approach.
Therefore, the two applications showed that the proposed approach can achieve high control accuracy (comparable to the offline approach MIIFC) and is tractable (while RNNPC is intractable).

VI. CONCLUSION AND FUTURE WORK
In this work, linearization based on Koopman operators has been proposed for predictive control in precision positioning system. Koopman approach linearizes the nonlinear dynamics in the way that the prediction error over future N p steps is minimized thus is suitable for predictive control. Furthermore, by introducing two linear models, the control performance can be further improved. The simulation results showed that Koopman approach is much better than the Taylor approximation for system linearization. The proposed approach was further validated in two nano-positioning applications.
The proposed approach can be considered for other dynamical model in the state space form including but not limited to RNN-based models. However, the trade-off between modeling accuracy and computation load must be made as increasing the number of model parameters leads to higher modeling accuracy and computation burden at the same time. Another point to be noted is the closed-loop stability of the predictive controller. It is still quite challenging to derive the stability condition to guide the selection of parameters for the predictive controller. These issues will be investigated in the future work. In addition, the current extension of Koopman operators for systems with exogenous input is mathematically complete but not good enough in the sense that the lifted space can still be very large thus affecting the computation efficiency.