{'fraction_non_alphanumeric': 0.04464564470808617, 'fraction_numerical': 0.012800499531689042, 'mean_word_length': 4.373112868439971, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Quadratic Regularization of Data-Enabled Predictive Control: Theory and Application to Power Converter Experiments

Data-driven control that circumvents the process of system identification by providing optimal control inputs directly from system data has attracted renewed attention in recent years. In this paper, we focus on understanding the effects of the regularization on the data-enabled predictive control (DeePC) algorithm. We provide theoretical motivation and interpretation for including a quadratic regularization term. Our analysis shows that the quadratic regularization term leads to robust and optimal solutions with regards to disturbances affecting the data. Moreover, when the input/output constraints are inactive, the quadratic regularization leads to a closed-form solution of the DeePC algorithm and thus enables fast calculations. On this basis, we propose a framework for data-driven synchronization and power regulations of power converters, which is tested by high-fidelity simulations and experiments.


INTRODUCTION
Data-driven control is a promising technique for complex systems, as it does not rely on an accurate model of the system, which is in many cases difficult to obtain and maintain. For example, in power system applications, the system model is ever-changing due to different operation modes, uncertainties, and relaying. This poses great challenges for conventional model-based design and tuning, but may potentially be handled using data-driven control due to the great availability of data (Huang et al., 2019b).
The concept of data-driven control dates back to 1980s when the techniques of system identification and adaptive control became popular (Goodwin and Sin, 2014;Ljung, 1999), and received renewed attention with the developments of iterative feedback tuning (Hjalmarsson et al., 1998), virtual reference feedback tuning (Campi et al., 2002), etc. Data-driven control based on reinforcement learning became a popular approach as well, which learns a policy directly from data (Recht, 2019). It is also possible to provide robustness guarantees for data-driven control, e.g., by means of system-level synthesis (Boczar et al., 2018). In recent years, multiple data-driven control methods (e.g., Berberich et al. (2020); Coulson et al. (2019a); De Persis and Tesi (2019)) have been proposed based on a result originally formulated by Willems et al. (2005) and recently extended by Markovsky and Dörfler (2020) in the context of behavioral system theory. This result is also known as the Fundamental Lemma and shows that the subspace of input/output trajectories of a linear timeinvariant (LTI) system can be obtained from the column span of a data Hankel matrix, thereby avoiding a parametric system representation.
Here we concentrate on a data-enabled predictive control (DeePC) algorithm proposed in . Rather than a parametric model, in the spirit of the Fundamental Lemma, the DeePC algorithm relies only on input/output data measured from the unknown system to predict future trajectories and compute safe and optimal control inputs for the system. The DeePC algorithm has been successfully applied in many scenarios, including power systems (Huang et al., 2019a,b), motor drives (Carlet et al., 2020), and quadcopters (Elokda et al., 2019). It has been frequently observed that regularization terms are very important to ensure good performance when the system is subjected to disturbances. Coulson et al. (2019b) showed that regularization provides distributional robustness against stochastic disturbances. Xue and Matni (2020) arrive at similar conclusions via a robust control formulation. Though, the robust performance still needs to be investigated thoroughly under bounded disturbances.
In this paper, we provide theoretical motivation and interpretation for adding a quadratic regularization term in DeePC from a robust optimization perspective. We show how including a quadratic regularization is equivalent to a min-max optimization problem that minimizes the worst-case performance for bounded disturbance sets imposed on the input/output data. This suggests that, unlike system identification methods that filter out the disturbances to fit a certain model, the regularized DeePC algorithm directly provides robust control inputs to the system with regards to the disturbances in data. Moreover, the quadratic regularization allows one to obtain a closedform solution of the DeePC algorithm enabling the fast calculation of optimal inputs. We exploit these properties of DeePC with quadratic regularization to robustly control a grid-connected power converter to achieve data-driven synchronization and power regulation. Our results are illustrated with high-fidelity simulations and experiments.

Notation and Preliminaries on the Fundamental Lemma
Consider an nth-order discrete-time LTI system where A ∈ R n×n , B ∈ R n×m , C ∈ R p×n , D ∈ R p×m , x t ∈ R n is the state of the system at t ∈ Z ≥0 , u t ∈ R m is the input vector, and y t ∈ R p is the output vector.
The lag of the system (1) is defined by the smallest integer ∈ Z ≥0 such that the observability matrix O (A, C) := col(C, CA, ..., CA −1 ) has rank n, i.e., the state can be reconstructed from measurements. Here col(a 0 , a 1 , ..., a i ) := [a 0 a 1 · · · a i ] . In a data-driven setting, and n are generally not known, but upper bounds can usually be inferred.
Consider L, T ∈ Z ≥0 with T ≥ L > and length-T input and output trajectories of (1): u = col(u 0 , u 1 , . . . u T −1 ) ∈ R mT and y = col(y 0 , y 1 , . . . y T −1 ) ∈ R pT . We denote the set of all such trajectories as the restricted behavior. For the inputs u, define the Hankel matrix of depth L as Accordingly, for the outputs define the Hankel matrix H L (y). Consider the stacked matrix H L (u, y) = H L (u) H L (y) .
By (Markovsky and Dörfler, 2020, Corollary 19), the length-L restricted behavior equals the image of H L (u, y) if and only if rank(H L (u, y)) = mL + n. In words, the Hankel matrix H L (u, y) composed of a single length-T trajectory parametrizes all length-L trajectories provided that (and only that) rank(H L (u, y)) = mL+n. This result extends and includes the original Fundamental Lemma (Willems et al., 2005, Theorem 1) which requires controllability and persistency of excitation of order L + n (i.e., H L+n (u) must have full row rank) as sufficient conditions. The result by Markovsky and Dörfler (2020) also extends to mosaic Hankel, Page, and trajectory matrix structures.
These behavioral results can be leveraged for data-driven prediction and estimation as follows. Consider T ini , N, T ∈ Z ≥0 as well as an input/output time series col(u d , y d ) ∈ R (m+p)T so that rank H Tini+N (u d , y d ) = m(T ini +N )+n. Here the superscript "d" denotes data collected offline in a single shot, and the rank condition can be met by choosing u d to be persistently exciting of sufficiently high order (assuming that the system is controllable). Further partition the Hankel matrix H Tini+N (u d , y d ) as where U P ∈ R mTini×H , U F ∈ R mN ×H , Y P ∈ R pTini×H , Y F ∈ R pN ×H , and H = T − T ini − N + 1. In the sequel, the data in the partition with subscript P (for "past") will be used to estimate the initial condition of the system, whereas the data with subscript F will be used to predict the "future" trajectories. In this case, T ini is the length of an initial trajectory measured in the immediate past during on-line operation, and N is the length of a predicted trajectory starting from the initial trajectory. Recall that The initial trajectory col(u ini , y ini ) ∈ R (m+p)Tini can be thought of as setting the initial condition for the future (to be predicted) trajectory col(u, y) ∈ R (m+p)N . In particular, if T ini ≥ , for every given future input trajectory u, the future output trajectory y is uniquely determined through (4) (Markovsky and Rapisarda, 2008).

Review of the DeePC algorithm
The DeePC algorithm proposed in Coulson et al. (2019a) directly uses input/output data collected from the unknown system to predict the future behaviour, and perform optimal and safe control without identifying a parametric system representation. More specifically, DeePC solves the following optimization problem to obtain the optimal future control inputs min g,σy u∈U ,y∈Y where the sets U ⊆ R mN and Y ⊆ R pN describe the feasible region of the input u and output y of the system (assumed to be polytopes), R ∈ R mN ×mN is the control cost matrix (positive definite), Q ∈ R pN ×pN is the output cost matrix (positive semidefinite), σ y ∈ R pTini is an auxiliary slack variable to ensure feasibility of the least-square initial condition estimation, λ y ∈ R >0 is regularization parameter, r ∈ R pN is the reference trajectory for the outputs, N is the prediction horizon, col(u ini , y ini ) consists of the most recent input/output trajectory of (1) of length T ini , and a 2 X denotes the quadratic form a Xa. DeePC involves solving the convex optimization problem (5) in a receding horizon manner, that is, after calculating the optimal control sequence u , we apply (u t , ..., u t+k−1 ) = (u 0 , ..., u k−1 ) to the system for k ≤ N −1 time steps, then, reinitialize the problem (5) by updating col(u ini , y ini ) to the most recent input and output measurements, and setting t to t + k, to calculate the new optimal control for the next k ≤ N − 1 time steps. As usual in MPC, the control horizon k is a design parameter.
A regularization term on g can be included in the cost function of (5) to ensure robustness in case of noisy data samples. For example, when stochastic disturbances affect the output measurements, a two-norm regularization on g coincides with distributional two-norm robustness in the trajectory space . Other forms of regularization (one-norm penalty, etc.) on g can also be used to provide different types of robustness. It was also reported in (Xue and Matni, 2020) that a robust control formulation of (5) leads to a two-norm regularization.

ROBUSTNESS INDUCED BY REGULARIZATION
In this section, we provide a theoretical motivation and interpretation for adding a quadratic regularization on g in DeePC from a robust optimization perspective. We start by noting that the explicit equality constraints in (5) can be eliminated, leading to where G = {g | Gg ≤ q} for some G and q, Notice that the solution of (7) will in general not be robust to disturbances on A, which in our case contains the historical input/output data. As a remedy, one can instead consider a robust version of (7) by solving the following min-max optimization problem min where ∆ is the disturbance matrix affecting A, ∆ F = i,j ∆ 2 ij denotes the Frobenius norm, and β > 0 is the bound on ∆ F . Eq. (8) minimizes the worst-case cost with respect to the disturbances on the matrix A. Hence, the minimizer g (and thus the optimal control input sequence u = U F g ) is robust against disturbances affecting the data matrices (U P , Y P , and Y F ).
The following result explicitly shows how the minimizer of (8) can be obtained by solving a regularized version of (7) with a quadratic regularization on g.
Proof. Consider the Lagrangian of (9) where µ Q is the vector of the dual variables. Since G is nonempty, there exists a solution (g , µ Q ) to the Karush-Kuhn-Tucker (KKT) conditions of (9) (13) (14) (15) Therefore, the vector g is a minimizer of (9).
Following (Bertsimas and Copenhaver, 2018, Theorem 2) and (El Ghaoui and Lebret, 1997), the min-max problem (8) can be equivalently reformulated as min Consider the Lagrangian of (16) where µ is the vector of the dual variables. By choosing β in (10), it can be verified that (g , µ , y , z ), where otherwise, z = βg / g 2 if g = 0, and z = 0 otherwise, and g as before, satisfy the KKT conditions of (16): where (19) and (20) follow from the definition of subgradient for the convex functions Ag − b 2 and g 2 , respectively. Thus, the vector g is also a minimizer of (16) (and (8)).
Theorem 1 shows that the robust solution of (7) can be obtained by simply adding a quadratic regularization term, and thus the problem can be solved efficiently. Moreover, the Frobenius norm of the disturbance matrix is bounded by β, which is monotonically increasing in λ g . The bound β is an a-posteriori guarantee obtained after solving (9). With a larger λ g , the disturbance set becomes larger including more possible disturbances. Obviously, an overly large λ g gives a conservative formulation.
In Theorem 1, we consider disturbances affecting A (i.e., affecting the data matrices U P , Y P , and Y F ). The following result will show that the quadratic regularization on g also provides robustness against disturbances on the vector b. Corollary 2. If a vector g ∈ R H is a minimizer of (9), then g minimizes min where ∆ is the disturbance matrix affecting A, and ξ is the disturbance vector affecting b.
Corollary 2 indicates that the quadratic regularization in (9) actually provides robustness against disturbances affecting both A and b. In other words, the solution to (9) is robust to the disturbances affecting the data matrices (U P , Y P , and Y F ) and the initial output trajectory y ini . However, the considered disturbance set (resulting from the quadratic regularization) is conservative because some entries in A (e.g., the entries of U P ) and b (e.g., the entries of r) are not subjected to disturbances. Moreover, how the considered disturbances affect input/output signals is also related to the scaling matrices, e.g., Q 1 2 in A. We will consider structured disturbance sets in future work.

APPLICATIONS TO POWER CONVERTERS
Power converters have been extensively used in modern power systems to accommodate large-scale renewable generation and high-voltage DC systems. Conventional control schemes for power converters are model-based, however, an accurate system model can rarely be obtained especially when the converter is connected to a power grid. This may result in inferior performance or even instabilities. In this section, we apply the DeePC algorithm with quadratic regularization to perform model-free optimal control in grid-connected power converters.
The DeePC algorithm has been successfully applied in grid-connected power converters for data-driven oscillation damping in Huang et al. (2019a,b). However, in these works, the converters still rely on conventional schemes to achieve grid synchronization, power regulation, etc., and the DeePC algorithm only provides the control signal Collecting input/output data to construct the Hankel matrices Fig. 1. A data-driven control framework for power converters based on DeePC algorithm. to stabilize the system. Here, we present a data-driven control framework for power converters to achieve grid synchronization and power regulation simultaneously. Fig. 1 shows a three-phase power converter which is connected to an AC power grid via an LCL filter. A current control loop is used to enable fast current tracking and current limitation. The control objectives of the converter include grid synchronization and active/reactive power regulation. As illustrated in Fig. 1, we choose the qaxis voltage component V q , active power P E , and reactive power Q E to be the output signals of the converter system. The DeePC algorithm provides optimal control inputs that enter the converter system as internal frequency deviation ∆ω and current references I ref d , I ref q . Note that u i,t is the ith element of u t and y i,t the ith element of y t in Fig. 1.

Data-Driven Synchronization and Power Regulation
Before the DeePC algorithm is activated, input/output data measured from the converter system needs to be collected to construct the Hankel matrices. Note that a phaselocked loop (PLL) is used to stabilize the system when the DeePC is not activated, but is then bypassed once the DeePC is activated. After constructing the Hankel matrices, the optimal control inputs are obtained by solving (9) in a receding-horizon manner. The control framework in Fig. 1 achieves grid synchronization by minimizing the trajectory of V q (i.e., making the control coordinate aligned with the voltage vector). The active/reactive power regulations are achieved by giving references for the output signals P E and Q E . We set the reference vector to r = I N ⊗ col(0, P 0 , Q 0 ) to achieve the above control objectives, where ⊗ denotes the Kronecker product, I N ∈ R N ×N is the identity matrix, P 0 is the active power reference value, and Q 0 is the reactive power reference value.

Closed-Form Solutions
The quadratic regularization in (9) not only provides robustness for the DeePC algorithm, but also allows one to obtain the solution by quadratic programming. Moreover, if there are no input or output constraints (or if they are inactive at the optimal solution (33) below), we can compactly obtain the closed-form solution of (9) as where M ∈ R H×(H+mTini) is defined by The closed-form solution in (33) is simply a linear mapping of the initial trajectory col(u ini , y ini ) and the reference vector r (Alexandru et al., 2020;Carlet et al., 2020). If it happens to satisfy any input and output constraints, it provides a fast way to obtain the minimizer of (9) and thus the optimal input sequence u = U F g .

Simulation Results
In The control horizon is k = 1, that is, after applying u 0 to the system, we update the initial trajectory and then calculate the optimal inputs for the next time step. = 0, and a PLL is used to generate ∆ω. From 0.5s to 1s, the input/output data of the converter is collected to construct the Hankel matrices. During this period, the output of the PLL and a white-noise signal are added to the input signal ∆ω, i.e., u 1,t ; a constant setting value 0.2 and a white-noise signal are added to I ref d , i.e., u 2,t ; a constant setting value 0 and a white-noise signal are added to I ref q , i.e., u 3,t . The white-noise signals (with noise power 6 × 10 −7 p.u.) ensure that the input trajectory is persistently exciting. After collecting the data, the noise is switched off, and I ref d is set back to 0. The PLL is then switched off and the DeePC controller is switched on at 1.5s with Q 0 = 0 and P 0 = 0. Finally, active power reference P 0 steps from 0 to 0.3p.u. at 2s.
In Fig. 2 (a), the measurement noise for the output signals is not considered, and the converter has very fast and smooth response to the change of P 0 (without any overshoot) when choosing λ g = 10. Moreover, the active power perfectly tracks the reference value in steady state, which is achieved by penalizing the tracking error in the cost function of (9). The response becomes slower by increasing λ g to 10 3 , and it becomes even slower by further increasing λ g to 10 4 (there also exist very small steadystate tracking errors in these two cases). This is expected: the increase of λ g indicates that the optimal control inputs are robust with respect to a larger disturbance set according to Theorem 1. This leads to conservativeness at the expense of performance if the disturbance set is unnecessarily large. Hence, the tuning of λ g can also be considered as a convenient way to change the response speed of the system. Conversely, when choosing λ g to be too small, e.g., λ g = 10 −5 , the active power cannot effectively track the reference value. This is because the data in the Hankel matrices contains the true nonlinear   behaviors of the system, and leads to prediction errors and inferior performance without proper robustification. Fig. 2 (b) shows the active power responses of the converter when considering measurement noise on the output signals. It can be seen that by choosing λ g = 10, the converter has effectively perfect tracking performance to the change of power reference. With λ g = 10 −5 , the tracking error is larger than (a) because the disturbance set is not large enough to cover the measurement noise. Fig. 2 (a) and (b) also plot the A-phase voltage and current of the system with λ g = 10. It shows that the sinusoidal waveforms are well controlled by the DeePC algorithm in all the cases.

Experiment Results
In this section, we provide experiment results of the converter system given in Fig.1 to show the performance of the DeePC algorithm in realistic settings. The experiments are based on an Imperix PEB platform (which contains IGBT bridges, passive elements, analog sensors, etc.), and the DeePC algorithm is implemented in an ARM-based processor (B-BOX RCP) which provides control signals to the IGBT bridges (Imperix, 2020). The parameters of the experiments are the same as those in the simulation setup. We ignore the input/output constraints and use the closed-form solution of DeePC given in (33) to enable fast calculation and convenient implementation.
The experiment results are shown in Fig. 3. In Fig. 3 (a), white-noise signals are injected into the converter such that the input trajectory is persistently exciting. It can be seen that the fluctuations of the active power and current signals are acceptable during this data-collection period. Fig. 3 (b) displays the time-domain responses of the converter when the DeePC algorithm is activated. The active power reference steps from 0 to 0.3p.u. at 0.08s. It can be seen that the active power perfectly tracks the change of the reference signal, with the rise time being 0.02s. The voltage and current signals are pure sinusoidal signals in steady state, without any power quality issues.

CONCLUSION
This paper focused on understanding the effects of the quadratic regularization in DeePC. We explicitly show that the regularized DeePC is equivalent to a min-max formulation which minimizes the worst-case cost for a bounded disturbance set affecting the data Hankel matrices and the initial trajectory. Our analysis highlights the importance of the quadratic regularization in DeePC for robustness. In the absence of input and output constraints, we derived a closed-form solution of the DeePC algorithm with quadratic regularization for fast calculation. Based on the above features, we proposed a framework for gridconnected converters to achieve data-driven synchronization and power regulation, and we tested its performance with high-fidelity simulations and experiments. Future work will investigate the robustness of other forms of regularization and consider structured disturbance sets.