{'fraction_non_alphanumeric': 0.036173702840369505, 'fraction_numerical': 0.012475179141845809, 'mean_word_length': 4.508083689966714, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Maximum Likelihood Signal Matrix Model for Data-Driven Predictive Control

The paper presents a data-driven predictive control framework based on an implicit input-output mapping derived directly from the signal matrix of collected data. This signal matrix model is derived by maximum likelihood estimation with noise-corrupted data. By linearizing online, the implicit model can be used as a linear constraint to characterize possible trajectories of the system in receding horizon control. The signal matrix can also be updated online with new measurements. This algorithm can be applied to large datasets and slowly time-varying systems, possibly with high noise levels. An additional regularization term on the prediction error can be introduced to enhance the predictability and thus the control performance. Numerical results demonstrate that the proposed signal matrix model predictive control algorithm is effective in multiple applications and performs better than existing data-driven predictive control algorithm.


Introduction
In control applications, despite the wide use of data to understand the response of a system, conventional methods are focused on identifying a compact model of the system based on first principle model structures or low-order approximation (Ljung (1999)). This enables the design of simple but effective feedback control laws. However, this idea of model-based control is challenged by the increasing complexity of modern systems, where compact models are hard to obtain (Hjalmarsson (2005)). On the other hand, modern systems are usually associated with a large set of available data. Therefore, model-free approaches have been proposed to learn the control action directly from collected data without an explicit formulation of the system model, e.g., reinforcement learning (Lagoudakis and Parr (2003); Powell (2007)). However, it has been observed in Recht (2019) that these approaches tend to perform in a much less data-efficient manner in simple tasks compared to model-based methods.
In this paper, we focus on a control design strategy which lies in between the model-based and the model-free approaches. This strategy still aims to obtain a description of the system, but in the form of a non-parametric input-output mapping instead of a compact parametric model. In detail, the input-output mapping is derived based on the Willems' fundamental lemma proposed in Willems et al. (2005) that characterizes all possible trajectories of length up to the order of persistency of excitation by constructing Hankel matrices from data. This implicit representation of the system has been successfully applied to simulation and control problems with noise-free data in Markovsky and Rapisarda (2008); Coulson et al. (2019a) ;. These results in the noise-free case are extended to noise-corrupted datasets by maximum likelihood estimation in Yin et al. (2020). The derived data-driven input-output mapping, dubbed the signal matrix model (SMM), provides a statistically optimal formulation to predict the response of the system. This paper focuses on the application of SMM to receding horizon predictive control algorithms. This optimization-based control algorithm is suitable to solve optimal trajectory tracking problems with constraints. When a model of the system is available, it is commonly known as model predictive control (MPC) (Camacho and Bordons (2016)). In this work, the model-based predictor is replaced with a linearized SMM constraint obtained directly from the data-based signal matrix. This algorithm is efficient in handling large datasets by data preconditioning without increasing online computational complexity. It is demonstrated by numerical examples that this algorithm performs better than existing data-driven predictive control algorithm with noisy data. This paper proposes multiple novel extensions of the algorithm and analyzes their performances with numerical examples. Online data can be incorporated in the signal matrix to make the algorithm adaptive. This improves our knowledge of the system online, and extend the algorithm to slowly time-varying systems. When data with high noise levels are treated, better initial condition estimation can be achieved with longer past trajectory measurements. The predictability along the closed-loop trajectories is enhanced by introducing a prediction error regularization term in the objective function, and thus the control performance can be improved as well.

Data-Driven Predictive Control
Consider a minimal discrete-time linear time-invariant (LTI) dynamical system with output noise, given by where x t ∈ R nx , u t ∈ R nu , y t ∈ R ny , w t ∈ R ny are the states, inputs, outputs, and output noise respectively. The model parameters (A, B, C, D) are unknown, but input-output trajectory data (u d i , y d i ) N −1 i=0 of the system have been collected. We are interested in designing a data-driven controller that obtains optimal tracking to a reference trajectory r in the sense of minimizing the total cost: where J t is the stage cost at time t, y 0 t is the noise-free output, Q and R are the output and the input cost matrices respectively, and N c is the length of the control task. This can be achieved by receding horizon predictive control. In detail, at each time instant t, the controller predicts an admissible input-output trajectory of length L ′ of the system that minimizes the predicted cost of future L ′ steps online, i.e., minimizê u,ŷ J ctr := i=−∞ are the immediate past input-output trajectory, and U ⊆ R L ′ nu , Y ⊆ R L ′ ny are the sets of admissible inputs and outputs respectively. Then, the first entry in the newly optimized input sequence is applied to the system in a receding horizon fashion.
In standard model predictive control, the constraint (3b) is enforced based on a known model of the system, such as (1) with a state estimation scheme. Alternatively, in the data-driven predictive control framework, this constraint is directly formulated from the collected data of the systems, namely (u d i , y d i ) N −1 i=0 , without knowing the model parameters. In this regard, it is proved in Willems et al. (2005) and, in a state-space context, De Persis and Tesi (2020); van Waarde et al.
(2020) that all the possible trajectories of a linear system within a time horizon can be captured by a single persistently exciting trajectory of the system when no noise is present. Based on these results, the following proposition holds.
Proposition 1 Assume that 1) the system is noise-free, i.e., ∀i, w i = 0; 2) the collected input trajectory is persistently exciting of order (L + n x ), i.e., the block Hankel matrix constructed from (u d i ) N −1 i=0 with (L + n x ) block rows has full row rank; and 3) L 0 := L − L ′ ≥ n x . Then constraint (3b) is equivalent to the following statement: there exists g, such that where Proof This is a direct extension of Proposition 1 in Markovsky and Rapisarda (2008).
Equation (4) provides an implicit input-output mapping betweenû andŷ with an intermediate parameter g, by constructing the matrix col (U, Y ). This matrix is constructed from offline measurement data and referred to as the signal matrix in the remainder of the paper. By replacing the constraint (3b) with the parametric relation (4), the predictive controller can be designed without any knowledge of the model parameters in (1). This method is known as the data-enabled predictive control (DeePC) algorithm (Coulson et al. (2019a)).

The Maximum Likelihood Signal Matrix Model
A strong assumption in Proposition 1 is that the data are noise-free, under which the signal matrix is rank deficient with rank (col (U, Y )) = n x + n u L as shown in Theorem 2 of Moonen et al. (1989). This guarantees that, though (4) is a highly underdetermined linear system when a large dataset is available, the input-output mapping fromû toŷ is still well-defined. However, when the data are noise-corrupted, the signal matrix has full row rank almost surely, and thus for anyû,ŷ, there exists g that satisfies (4) almost surely. The input-output mapping becomes ill-conditioned. In order to extend the DeePC algorithm to noise-corrupted data, empirical regularization terms on g have been introduced in the objective function. The optimization problem becomes minimizê u,ŷ,g where Y p is the first L 0 · n y rows of Y , Y f is the last L ′ · n y rows of Y , and p = 1 or 2 depending on the noise model. This is known as the regularized DeePC algorithm (Coulson et al. (2019b)). However, this method requires tuning of the hyperparameters λ g , λ y , and the input-output mapping obtained from the regularized problem is affected by the control cost J ctr .
In this paper, we investigate an alternative approach to obtain a tuning-free, statistically optimal, and well-defined input-output mapping with noise-corrupted data by maximum likelihood estimation. This input-output mapping, known as the signal matrix model (Yin et al. (2020)), can then be applied in place of constraint (3b) in the optimization problem when noisy data are available.
Specifically, consider the case where both the signal matrix and online measurements of y ini are corrupted with i.i.d. Gaussian output noise: where for simplicity of exposition, we assume n y = 1. Defineỹ = col (ǫ y ,ŷ) = Y g − col (y ini , 0) , where ǫ y := Y p g − y ini is the total deviation of the past output trajectory from the noise-free case. Then the parameter g can be estimated by maximizing the conditional probability density of observing the realizationỹ corresponding to the available data given g, i.e., max g p(ỹ|g). This is equivalent to the following optimization problem: where G is the parameter space defined by the noise-free input trajectory, namely G = {g ∈ R M | U g = col (u ini ,û) }, and Σ y (g) is the covariance ofỹ given g with entries To find a computationally efficient algorithm to solve (7), we relax the problem by neglecting the cross-correlation between elements in the signal matrix, and thus the off-diagonal elements in Σ y (g). This leads to the following iterative algorithm: For details on the derivation of the maximum likelihood estimator and the associated iterative algorithm, readers are referred to Section IV in Yin et al. (2020). The maximum likelihood signal matrix model can be compactly represented as follows: where g SMM (·) is the converged solution of the iterative algorithm (9). This model provides a datadriven input-output mapping when signals are measured with i.i.d. Gaussian output noise. Similar signal matrix models can be developed for alternative noise models, such as process noise.

Data-Driven Predictive Control with the Signal Matrix Model
In this section, the signal matrix model is applied to the data-driven predictive control framework as the predictor. Throughout this section, numerical examples tested on the following fourth-order LTI system: are considered. The goal is to achieve optimal output tracking of a sinusoidal reference trajectory r t = 0.5 sin π 10 t . The control design parameters are chosen as Q = 1, R = 1, L ′ = 10, and L 0 = n x = 4 with no input and output constraints, i.e., U = Y = R L ′ , unless otherwise specified. The length of the control task N c is 120. The offline input-output trajectory data are collected with unit i.i.d. Gaussian input signals, and the noise levels σ 2 and σ 2 p are assumed known. To benchmark the performance, we consider the ideal deterministic MPC algorithm with knowledge of the true state-space model and the noise-free state measurements, which will be indicated by MPC in the following figures. The signal matrix model (10) can be directly incorporated in the receding horizon predictive control scheme (3) by replacing (3b) with the SMM. However, the maximum likelihood estimator g SMM (·) involves an iterative algorithm which does not have a closed-form solution. This makes the optimization problem computationally challenging to solve, especially in an online scheme. To address this problem, we propose warm-starting the iterative algorithm with the value of g at the previous time instant and approximating g SMM (·) with the first iterate, i.e., where, with an abuse of notation, g t (·) denotes the approximation of g SMM (·) with one iteration at time instant t, and the right hand side is the closed-form solution of the quadratic program (9) with g k = g t−1 . This leads to the linearized signal matrix model: and thus the predictive control problem (3) becomes a quadratic program: The value of g is initialized with the pseudo-inverse solution to the reference output trajectory, i.e., To assess the validity of the linearized SMM, we investigate the discrepancy between the linearized SMM and the iterative nonlinear SMM in the following example.
Example 1 Consider input-output trajectory data of length N = 50 with noise level σ 2 = 0.1. The online measurement noise level is σ 2 p = 0.1. The data-driven predictive control is conducted by solving (14) with the linearized SMM constraint. At each time instant t = 0, 1, . . . , N c − 1, the results of the linearized SMM predictor (13) and the iterative SMM predictor (10) are compared with the newly optimized input sequence and quantify their discrepancy by The histogram of E is plotted in Figure 1. It can be seen from Figure 1 that the error resulting from the linearization of SMM is less than 5% for most time instants, which shows that the linearized SMM can obtain an accurate input-output mapping. Therefore, in the following analysis, the linearized SMM (13) will be employed.
In the first test, we compare the signal matrix model predictive control (SMM-PC) with the regularized DeePC algorithm in the following example. (5) is also applied. The hyperparameter λ g is selected from a nine-point logarithmic grid between 10 and 1000 with an oracle (choosing the value with the optimal performance a posteriori); λ y is fixed to 1000 since the control performance is not sensitive to it in this example. 50 Monte Carlo simulations are conducted, and the closed-loop input-output trajectories within one standard deviation are plotted in Figure 2. As shown in Figure 2, the output trajectory obtained with the SMM-PC algorithm is closer to the reference trajectory with smaller inputs compared to the regularized DeePC algorithm. In addition, the applied input trajectory is much smoother for the SMM-PC algorithm, which indicates that the input-output mapping predicted by the linearized SMM is more accurate compared to the regularization method. For more detailed comparison with the DeePC algorithm, readers are referred to Section VI.C in Yin et al. (2020).

Example 2 Consider an MPC problem with the same trajectory data and online measurement noise as in Example 1. In addition to SMM-PC, the regularized DeePC algorithm
The data-driven formulation of the input-output mapping with the linearized signal matrix model enables flexible extensions to the algorithm under multiple scenarios, including large datasets, poor data quality, and time-varying systems. These extensions will be discussed as follows.
When a large set of input-output trajectory data are collected, i.e., N ≫ L, the dimension of the intermediate parameter g ∈ R M will be much larger than the time horizon of the predictive control. This is an undesired feature as it leads to high computational complexity online. Therefore, we propose the following strategy to compress the dimension of g to 2L regardless of the data length. Proof This is a direct extension of Proposition 1 in Yin et al. (2020).
Proposition 2 shows that regardless of the size of the dataset, an SVD operation can be conducted offline to reduce the size of the signal matrix to a square matrix while obtaining exactly the same results as with the original signal matrix. In this way, the online computational complexity is only dependent on the control horizon.

Incorporation of Online Data
In addition to the offline data (u d i , y d i ) N −1 i=0 , online measurements can also be used to construct the signal matrix. By doing so, the knowledge of the unknown system improves as the predictive controller is deployed. This is particularly useful when the quality of the offline data is poor or the model parameters are varying online. This strategy can be interpreted as an equivalent of adaptive MPC (Fukushima et al. (2007)) for the signal matrix model.
At each time instant t ≥ L, a new column can be added to the signal matrix with where col (U t , Y t ) is the adaptive signal matrix applied to the SMM-PC algorithm at time t, and γ is the forgetting factor of previous trajectories. The factor γ is chosen as 1 for LTI systems and γ ∈ (0, 1) when model parameter variations are expected. Similar to the offline signal matrix, the adaptive signal matrix can also be compressed online to maintain 2L columns. The incremental singular value decomposition algorithm in Brand (2002) can be applied to reduce the computational complexity of updating the compressed signal matrix, which makes use of the property that the SVD of col (U t , Y t ) in (16) is already known from the previous timestep. In the following two examples, the effects of incorporating online data are investigated under high noise levels and with slowly varying parameters respectively. Example 4 Consider the case where one of the model parameters drifts slowly online with The offline data length and the noise levels are N = 50, σ 2 = σ 2 p = 0.01 respectively. The SMM-PC algorithms are compared with the fixed signal matrix col (U, Y ) and the adaptive signal matrix col (U t , Y t ) with γ = 1, 0.9, 0.7, 0.5. The stage costs J t are plotted on the left of Figure 4, and the boxplot of the total cost J tot is shown on the right of Figure 4 with 50 Monte Carlo simulations. As can be seen from Examples 3, the control performance improves by using adaptive signal matrices, as more online data are accumulated, though it cannot converge to the ideal MPC performance since the noise in y ini still exists. For Example 4, the controller further benefits from a forgetting factor γ < 1 to reduce the weight of previous trajectories with less accurate model parameters. The best performance is achieved with γ = 0.9. These results demonstrate that incorporating online data is effective in achieving better control performance for both high noise levels and slowly time-varying systems.

Initial Condition Estimation
Another problem of measurements with high noise levels is the accuracy of initial condition estimation with the past trajectory measurements col (u ini , y ini ). Although the large prediction errors due to poor offline measurements can be compensated by online data adaptation as shown in the previous subsection, the validity of the linearized SMM still suffers from deviated initial conditions. In the noise-free case, Proposition 1 holds for any L 0 ≥ n x , which gives the exact initial condition of the trajectory. So it is always reasonable to select L 0 = n x to reduce computational complexity. This is also the choice in previous examples. However, in the presence of noise, the signal matrix model only gives an estimate of the initial condition, whose accuracy depends on the choice of L 0 . Therefore, when abundant data are available but the noise level is high, it can be beneficial to select L 0 > n x to obtain a more accurate initial condition estimation, as shown in the following example.
Example 5 Consider the same trajectory data and online measurement noise as in Example 3. The controller performance of SMM-PC is compared with L 0 = n x = 4 and L 0 = 10. As another comparison, we introduce an additional MPC algorithm with a finite impulse response model obtained by simulating the signal matrix model with an impulse of u ini = 0, y ini = 0, u = col(1, 0), σ p = 0. This impulse MPC algorithm does not require the noisy past output measurements, so it circumvents the initial condition estimation problem. The stage costs J t are plotted in Figure 5.
Although the impulse MPC algorithm only uses a fixed predictor identified offline, the results from Figure 5 demonstrate that when L 0 = 4, SMM-PC performs worse than impulse MPC without online data and similarly when online data are incorporated, due to inaccurate initial condition estimation. When a larger value of L 0 = 10 is selected, the SMM-PC performs significantly better than impulse MPC and close to the ideal MPC algorithm.

Regularized Signal Matrix Model Predictive Control
In addition to the input-output mapping, the signal matrix model also gives an uncertainty model of the output prediction with cov(ŷ|g) = Σ y f , where Σ y f denotes the last L ′ rows and columns of Σ y . So the variance of the output prediction is given by Σ y f i,i = σ 2 g 2 2 . In order to enhance the robustness of the SMM-PC algorithm, an additional regularization term can be introduced to the J Reg-SMM = J ctr + ζ · σ 2 g t 2 2 .
Despite their similar forms, this regularization term is different from the λ g -term in regularized DeePC, where the regularization is required to fix the underdetermined input-output mapping. In regularized SMM-PC, the input-output mapping is well-defined via the linearized SMM constraint (13) and the regularization term is used to penalize trajectories that result in large prediction errors. Tuning of the hyperparameter ζ is also easier than regularized DeePC since the dependence of the noise level σ 2 is already separated in the prediction error formulation. In the following example, the performance of SMM-PC is compared for different choices of ζ.
Example 6 Consider the same data generation parameters as in Example 1 (N = 50, σ 2 = σ 2 p = 0.1). The regularized SMM-PC algorithm is applied for ζ = 0, 1, 10, 10 2 , 10 3 , 10 4 with 50 Monte Carlo simulations each. The boxplot of average g t 2 2 is shown in Figure 6(a) as a measure of prediction errors. The boxplots of the total cost J tot and the input cost J u tot := Nc−1 t=0 u t 2 R are plotted in Figures 6(b) and (c) respectively.  Figure 6: Performance of regularized SMM-PC with g 2 2 -regularization.
As can been seen from Figure 6, by increasing the hyperparameter ζ, the SMM-PC algorithm tends to select trajectories with smaller prediction errors, which also correspond to more conservative input trajectories with smaller magnitudes. As a result, the average performance first increases due to better prediction and then decrease due to large output tracking errors with the increase of ζ.

Conclusions
In this paper, a novel data-driven predictive control algorithm with the signal matrix model is investigated. The algorithm uses a linearized SMM to provide a close approximation to the maximum likelihood estimator of input-output trajectories. It combines the benefits of model-based and model-free methods by providing a non-parametric input-output mapping to characterize the system. By using the linearized SMM to implicitly parametrize future trajectories, the algorithm and its regularized version show good performance in complex scenarios with large datasets, poor data quality, parameter variation.