{'fraction_non_alphanumeric': 0.054320884797233966, 'fraction_numerical': 0.01737101914144675, 'mean_word_length': 4.257555847568988, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 15, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Data-Driven Resilient Predictive Control under Denial-of-Service

The study of resilient control of linear time-invariant (LTI) systems against denial-of-service (DoS) attacks is gaining popularity in emerging cyber-physical applications. In previous works, explicit system models are required to design a predictor-based resilient controller. These models can be either given a priori or obtained through a prior system identification step. Recent research efforts have focused on data-driven control based on pre-collected input-output trajectories (i.e., without explicit system models). In this paper, we take an initial step toward data-driven stabilization of stochastic LTI systems under DoS attacks, and develop a resilient model predictive control (MPC) scheme driven purely by data-dependent conditions. The proposed data-driven control method achieves the same level of resilience as the model-based control method. For example, local input-to-state stability (ISS) is achieved under mild assumptions on the noise and the DoS attacks. To recover global ISS, two modifications are further suggested at the price of reduced resilience against DoS attacks or increased computational complexity. Finally, a numerical example is given to validate the effectiveness of the proposed control method.


I. INTRODUCTION
Thanks to recent advances in computing and networking technologies, recent years have witnessed rapid developments in cyber-physical systems (CPSs), e.g., [1]- [5]. Nonetheless, it has been reported that such systems are often vulnerable to cyber-attacks [6], including false-data injection attacks [7], [8], replay attacks [9], [10], and denial-of-service (DoS) attacks [11]. For instance, on February 8, 2020, the telecommunication network of Iran suffered from DoS attacks for about an hour [12]. As a consequence, 25% of the national internet connection dropped, leading to severe damage of critical infrastructure as well as significant economic loss. In general, DoS attacks require little knowledge about the system and are therefore easy to be implemented. Moreover, DoS attacks are destructive. If an unstable open-loop process adopts a remote controller, then a long duration of DoS may render irreparable damages on physical systems as well as associated components. These observations motivate the need for effective mechanisms to defend against DoS attacks and/or to mitigate the associated effect on physical entities.
To this aim, a possible remedy is to design control strategies such that satisfied performance can be maintained regardless of the DoS attack strategies, which is referred to as resilient control. This problem was first addressed by the work [13], in which a transmission policy along with some conditions on DoS attacks were developed for resilient stabilization of LTI systems. Since then, a multitude of publications have studied resilient control of different systems, including, e.g., systems using an output-feedback controller in [14]- [16], multi-agent systems in [17], and nonlinear systems in [18].
It is worth emphasizing that all the aforementioned resilient control strategies build upon the model-based control approach developed in [19]. In other words, they require an explicit system model, or need to perform a system identification step a priori. Nonetheless, accurate system models may be challenging to acquire in real-world applications, while system identification of large-scale systems could be data hungry and/or computationally cumbersome. Data-driven methods, on the other hand, offer a new avenue for the control of unknown dynamic systems and pursue the design of a control law directly from data (i.e., from pre-collected input-output trajectories), e.g., [20]. This method also comes with rigorous theoretical guarantees thanks to the celebrated Fundamental Lemma [21]. Indeed, there has been a recent line of research works exploring the fundamental lemma for data-driven control of unknown LTI systems. Following the state-space description perspective, a parameterized model of linear feedback systems was developed such that state-feedback controllers can be directly obtained from solving data-dependent linear matrix inequalities in [22]- [26]. Due to the popularity of model predictive controllers in industrial applications (e.g., see [27]- [29]), another line of work dealt with data-driven MPC schemes (e.g., [30], [31]). Stability analysis and robustness guarantees of data-driven MPC against measurement noise have recently been studied in [32].
The goal of this present paper is to stabilize unknown LTI systems under DoS attacks based solely on input-output system trajectories acquired a priori through some off-line experiments. It has been shown in [14] that LTI systems equipped with a predictor-based controller based on an explicit system model can achieve maximum resilience against DoS attacks. Specifically, an observer-based predictor is employed to maintain a reasonable estimate of the state even in the presence of DoS attacks; a feedback controller is then developed based upon this estimate. Nevertheless, both designs of the observer arXiv:2110.12766v1 [eess.SY] 25 Oct 2021 and of the feedback controller require an explicit system model, rendering such control methods difficult to apply when only input-output trajectories are available. To overcome this challenge, a data-driven resilient MPC scheme is developed in this paper. Resembling the data-driven MPC scheme presented in [32], our resilient data-driven MPC generates a sequence of control inputs and associated predicted outputs by solving a convex optimization problem with purely data-dependent constraints, but only at time instants when new measurements are received (i.e., no DoS attack occurs). On the other hand, at time instants when there is a DoS attack, the corresponding measurement transmission fails. Our scheme takes the predicted control input from the most recent solution of the optimization problem, or simply a zero control input, depending upon whether the duration of DoS attacks exceeds the prediction horizon of the data-driven MPC.
It is worth pointing out that there are a couple of notable differences between the data-driven MPC scheme in [32] and the one developed here. To start with, in addition to DoS attacks, both process noise and measurement noise are modeled and accounted for in this paper, whereas only measurement noise was considered in [32]. Since both pre-collected measurements as well as the measurements received in the execution phase are corrupted by noise in [32], the resultant data-driven MPC involves solving a non-convex constrained optimization problem which can be computationally challenging (NP-hard in general). In contrast, we consider only process noise in the data-collecting phase, while addressing both process and network-induced measurement noise in the execution phase. Interestingly, this noise modeling approach leads to a convex data-driven MPC scheme in our paper, that is computationally appealing. Although a convex data-driven MPC scheme was also developed in [30], no stability analysis and robustness guarantees were provided. To the best of our knowledge, this is the first model-free (a.k.a. data-driven) controller that achieves the maximum resilience performance against DoS attacks as the model-based controller in [14].
In a nutshell, the main contribution of the present work is threefold, summarized as follows. c1) Addressing both process and measurement noise, a datadriven MPC scheme is proposed for the control of LTI systems. Our scheme generates a series of control inputs and associated predicted outputs through solving a convex optimization problem driven by purely input-output data; c2) Leveraging the idea behind the predictor-based controller [14], the proposed data-driven MPC scheme is further modified to accommodate DoS attacks, thereby becoming a data-driven resilient controller; and, c3) Under standard conditions on DoS attacks and noise, local input-to-state stability (ISS) of the closed-loop system is established for the proposed data-driven resilient MPC, along with modifications to recover global ISS.
Notation: Denote the set of real numbers by R, and the set of integers by Z. Given α ∈ R or α ∈ Z, let R >α (R ≥α ) or Z >α (Z ≥α ) denote the set of real numbers or integers greater than (greater than or equal to) α. Let N denote the set of natural numbers and define N 0 := N ∪ {0}. For a matrix M , its left pseudo-inverse and right pseudo-inverse are denoted by M † and M ‡ , respectively. Given a vector x ∈ R nx , x is its Euclidean norm, and for a positive definite matrix P = P T 0, define the weighted norm x P = √ x P x. Let further M be the spectral norm of matrix M . For discrete-time signals, define w [t1,t2] := max t∈[t1,t2] { w t }, and w ∞ := w [0,∞) Let λ P (λ P ) represent the minimum (maximum) eigenvalue of matrix P . Let I represent the identity matrix with suitable dimensions, with I q denoting its q-th row, and The Hankel matrix associated to the sequence A stacked window of the sequence is given by For notational convenience, we will use x to denote both the sequence itself and the stacked vector x [0,N −1] containing all of its components, whenever clear from the context.

A. Networked control systems
Consider the stochastic discrete-time linear time-invariant (LTI) system where x t ∈ R nx , u t ∈ R nu , y t ∈ R ny , and w t ∈ R nx are the state, control input, output, and noise of the plant, respectively. The initial state x 0 is arbitrary. We make the following assumptions on system (3).
Assumption 1 (Stabilizability and observability). The pair (A, B) is stabilizable, and the pair (C, A) is observable.
Assumption 2 (Unknown system model). The system matrices (A, B, C, D) in (3) are unknown, and only some input-output trajectories, i.e., {u s t , y s t } N −1 t=0 , obtained by some offline experiments are available.
At each time instant t, an output packet containing the past η output measurements, i.e., y [t−η,t−1] , is sent to the remote controller through a communication channel subject to DoS attacks. As a result, not all packets can be received at the controller side, and details about this attack will be presented in the next section. Moreover, we consider that during transmission, the output is corrupted by an additive network-induced noise n t , i.e., Assumption 3 (Noise bound). The process noise w t and the network-induced noise n t are bounded by a known constant v := max t { w t , n t } for all t ∈ N 0 .
On the other hand, the input u t generated by the controller goes through an ideal channel, i.e., the controller-to-plant channel is not affected by DoS attacks. See Fig. 1 for the depicted networked control system architecture.
Due to the presence of noise w t and n t , rather than the asymptotic stability, a weaker notion of stability, referred to as input-to-state stability (ISS), is explored in this paper. The definition of ISS adapted from [33, Definition 2.2] is presented as follows.
Definition 1 ([33, Definition 2.2]). The system (3) achieves input-to-state stability (ISS) if its solution satisfies where α is a function of class K ∞ 1 , and β is a function of class KL 2 . If (5) holds with v = 0, then the system is said to be globally asymptotically stable (GAS).
Finally, we review the so-called uniform input-output-to-state stability (UIOSS) of a system introduced in [34].
Proposition 1 (Uniform input-output-to-state stability). If the system (3) is observable, there exist constants c 1 , c 2 , c 3 > 0, and ∈ (0, 1), such that for every x ∈ R nx , u ∈ R nu , and w ∈ Bv, the system is UIOSS with the entire trajectory obeying for all t ∈ N 0 . In addition, there exists a matrix P = P T 0 such that for the UIOSS-Lyapunov function V = x T P x, the following inequality holds for some constants σ 1 , σ 2 , σ 3 > 0 for all t ∈ N 0 .

B. Denial-of-Service attack
Denial-of-Service (DoS) attacks are attacks that are launched by malicious routers and jammers to block communication channels, which can lead to data packet losses, and are thus destructive. Evidently for an open-loop unstable plant, a longduration of DoS can degrade the closed-loop system performance and even incur instability and divergence. Therefore, defensive structure should be judiciously designed and equipped with the system to achieve stability in the presence of as well as resilience against DoS attacks.
To rigorously evaluate the effectiveness of a defense method, a mathematical model characterizing DoS attacks should be introduced. Several models have been studied, and they can be roughly summarized as stochastic model and deterministic model. For instance, Bernoulli processes [35] and Markov processes [36] are often used to model DoS attacks. Another line along the stochastic model is using game-theoretic approaches to designing the attack strategy as well as the defense strategy simultaneously [37]. However, it is difficult to justify the incentive of an attacker using the stochastic model. To this aim, we call for a general deterministic model capitalizing on the DoS duration and the DoS frequency, that was initially presented in [13]. For each t ∈ N 0 , upon introducing the following DoS indicator t := 0, no DoS attack happens at t 1, a DoS attack happens at t , the DoS duration during the time interval i . In addition, defining for each t ∈ N d t := 1, t = 1 and t−1 = 0 0, otherwise , then the DoS frequency during interval [t 1 , t 2 ) is expressed by It is self-evident from the definitions that, if both the DoS duration and the DoS frequency are considerably sizable to prevent all packets from being transmitted, no meaningful control input can be constructed to stabilize the plant. As a consequence, some assumptions on the DoS frequency and DoS duration should be made for practical investigation purpose of system stability in the presence of DoS attacks.
Assumption 4 (DoS frequency). There exist constants κ f ∈ R ≥0 , and ν f ∈ R ≥2 , also known as chatter bound and average dwell-time, respectively, such that the DoS frequency satisfies Assumption 5 (DoS duration). There exist constants κ d ∈ R ≥0 , and ν d ∈ R ≥1 , also known as chatter bound and average duration ratio, respectively, such that the DoS duration satisfies over every time interval [t 1 , t 2 ), where t 1 ≤ t 2 ∈ N 0 .
In fact, the original version of modeling DoS attacks in terms of DoS frequency and duration was established in [13] to address the stabilization problem of a continuous-time system under DoS attacks. These notions have been popularly used in the literature; see e.g., [13], [14], [17], [18], [38]. When studying discrete-time systems, a discrete-time DoS model that is similar to the present one, was discussed in [15]. In their work, LTI systems without noise were considered, and thus weaker assumptions were used. To be specific, they constrained the DoS frequency and duration only on the interval [0, t), t ∈ N 0 , rather than on every sub-interval [t 1 , t 2 ) of [0, t).
Remark 2 (Implications of DoS parameters). Taking a switching systems perspective, the quantity ν f in Assumption 4 can be interpreted as the average dwell-time [39] between two consecutive DoS attacks off/on switches over the time interval [t 1 , t 2 ). On the other hand, Assumption 5 requires that the average duration of DoS attacks not exceed a fraction 1/ν d of the entire interval. The constants κ f and κ d are additional regularization parameters that can be chosen to attain tighter bounds on the DoS duration and on the DoS frequency, respectively. To see this, suppose a DoS attack happens at time t 1 . Then, it is obvious for the time interval [t 1 , suggests that a constant κ f ≥ 1 is required to ensure that (10) holds true for every time interval. The same reasoning can be conducted for κ d .
As a direct implication of Assumptions 4 and 5, it can be deduced that the number of time steps between two successful transmissions is upper bounded. Let {s r } r∈N0 collect the successful transmission time instants, at which sr = 0.

Lemma 1 ([14, Lemma 3]). Suppose that the DoS attacks satisfy Assumptions 4 and 5 with
1 Then it holds that s 0 ≤ T − 1, and s r+1 − s r ≤ T for all r ∈ N 0 with Remark 3 (Maximum resilience). Condition (12) is referred to as the maximum resilience against DoS attacks one can achieve for an open-loop unstable system [14,Lemma 3]. In other words, if (12) does not hold, i.e., 1/ν f + 1/ν d ≥ 1, then one can always design a sequence of DoS attacks to render the system unstable whatever control strategy is used. For example, consider a sequence of DoS attacks under which l t = 1 for all t ∈ N 0 . It is easy to check that this sequence of attacks satisfies Assumptions 4 and 5 with ν f = 1, ν d = ∞, κ d = 1, and κ f = 1. In addition, it can be obtained that 1/ν f + 1/ν d = 1. However, it is impossible to stabilize an open-loop unstable system under such attacks as there will be no successful transmissions from the system to construct meaningful control input signals.

C. Fundamental Lemma
The objective of this present paper is to design resilient controllers for stabilization of an unknown LTI system under DoS attacks and additive noise using only measured input-output data. Commonly, if the system matrices (A, B, C, D) were precisely known, a number of proposals have been presented for resilient control of LTI systems (3) under DoS attacks obeying Assumptions 4 and 5. A natural approach is to endow the closedloop control system with prediction capabilities such that the missing measurements can be reconstructed (predicted) during DoS [14]. To the best of our knowledge, no previous works have dealt with the stabilization problem of unknown systems in the presence of DoS attacks. There are three emerging challenges: i) how to characterize an LTI system as well as infer the wanted quantity from observed noisy input-output data; ii) how to design a resilient controller against DoS attacks based only on data; and, iii) the associated stability analysis and robustness guarantees.
To address the first challenge, we invoke the well-known Fundamental Lemma, that was initially discovered in [21] and subsequently generalized in [40] and [41]. Before formally presenting the Fundamental Lemma, the standard definition of persistency of excitation is introduced first.
Based on Definition 2, it has been shown in [21] that any input-output trajectory can be expressed as a linear combination of pre-collected persistently exciting input-output data, which is also known as the Fundamental Lemma.
Lemma 2 (Fundamental Lemma [21]). Consider the noise-free version of the LTI system (3) described by is a trajectory of the system (14) , induced by a persistently exciting input sequenceū s of order L + n x . Then, {ū,ȳ} := {ū t ,ȳ t } L−1 t=0 is a trajectory of the system (14) if and only if there exists a vector g ∈ R N −L+1 such that the following holds Regarding the Fundamental Lemma, two remarks come ready. Remark 4 (Requirements of Fundamental Lemma). Lemma 2 indicates that the length L of the constructed trajectory {ū,ȳ} depends on the persistently exciting order of the precollected data {ū s t ,ȳ s t } N −1 t=0 . More importantly, it offers a feasible way to design a data-dependent model for the noisefree LTI system (14). When dealing with the noisy system (3), some modifications should be made. Remark 5 (Different ways of pre-collecting trajectories). The sequence {ū s N ,ȳ s N } can be obtained from either a single long enough trajectory or formed by multiple short trajectories obtained by simulating the system using different initial conditions and input sequences. In fact, both ways of collecting data are equivalent; please refer to [40] for details.

D. Model-based observer-based controller
When the system matrices of (3) are perfectly known, modelbased control strategies for achieving stability under DoS attacks were designed in, e.g., [14], [35], [42]. In [35], [42], although MPC scheme were used for resilient control, neither the system model nor the attack model resemble that in the present work. On the other hand, the setting in [14] is the same as this paper. Moreover, system adopting the model-based observer-based control strategy in [14] achieves maximum resilient against DoS attacks. The key idea behind this strategy is to equip an observer at the sensor side to estimate the state x t at every instant, and adopt a predictor-based statefeedback controller using the predicted statex t -based control law u t = Kx t . When there is no DoS attack (i.e., t = s r ), the predictor receives new estimated statex t successfully from the observer, and updates the predicted statex t ; during DoS attacks (i.e., t = s r ) however, the predictor simply updates the predicted state following a prediction step based on the system model. Mathematically, the observer is given bȳ and the predictor-based controller is given bŷ where matrix L is a deadbeat observer gain matrix such that (A − LC) η = 0, and η is the observability index of the system [43]; and K is any stabilizing feedback gain matrix, i.e., A + BK is Schur stable. It has been shown in [14] that, for DoS attacks satisfying (12), the error betweenx t and x t is reset to a constant depending on the noise bound and the system matrices at least once every T time instants. Indeed, this resetting is guaranteed because there exists at least one successful transmission, in any sequence of T time instants, as guaranteed by Lemma 1.
Without loss of generality, consider the interval [0, T − 1], with s 0 = T − 1 being the first successful transmission. Define the errorē t :=x t − x t , and the errorê t :=x t − x t . It can be obtained from (3), (16), and (17) that For t = s 0 , it follows from the recursion in (18) that Moreover, since matrices A, L, C, and noise w t , n t are all finite and bounded, then the summation of products of finite moments of these terms is also bounded. This implies that when there is a successful transmission, the error is reset to a bounded value; that is, the estimated state matches the actual state well. For DoS attacks obeying (12), Lemma 1 guarantees that this "predict-then-reset" cycle of the estimation error, happens frequently (in fact, at least once every T time instants). In conclusion, under our working assumptions on the DoS attacks, the estimation error of the predictor in (17) with the selected parameters is always bounded, and the system can be stabilized. Obviously, successful application and implementation of the predictor-based controller in (17) to defend against DoS attacks hinges on perfect knowledge of the system model. When this knowledge is not available, although standard system identification approaches can be used to obtain an estimate of the model, this step can be time-consuming and computationally expensive as the size of the system increases. For this reason, data-driven methods, deriving control strategies directly from data without performing explicit system identification procedures, have become prevalent recently.

III. DATA-DRIVEN RESILIENT CONTROL UNDER DOS
In this section, we address the challenging stabilization problem of unknown LTI systems in the presence of DoS attacks. Our proposal is to redesign the robust predictor-based controller in (17) leveraging the Fundamental Lemma (15), to develop a novel resilient control scheme that capitalizes purely on data. Specifically, a data-dependent controller is first constructed to follow the predict-then-reset circle, which resembles the data-driven MPC developed in [32]. Capitalizing on this controller, a DoS-resilient MPC algorithm is proposed and subsequently corroborated by a stability analysis.

A. Data-driven resilient predictive control
According to Section II-D, a known LTI system under DoS attacks can be stabilized by the predictor-based controller (17). Without knowing the system matrices A and B, MPCs are preferred instead of state-feedback controllers in which closed-loop stabilizing feedback gain matrices K are in general hard to find. Traditional MPC schemes (e.g., [27], [29]) can predict future trajectories based on the system model, initial conditions, and using some terminal constraints. The optimal future trajectory is generated by minimizing a cost function. Choosing a control input from the optimal future trajectory, the system can be stabilized. Thanks to Lemma 2, any trajectory of an LTI system can be exactly characterized by a (single) input-output trajectory that is persistently exciting of enough order. This naturally inspires one to construct a data-driven MPC scheme, that is predicting future trajectories using some input-output collections to replace a system model. To sum up, our idea is to replace the model-based controller in (17) with a data-driven MPC, which builds solely on data consisting of a pre-collected input-output trajectory, initial conditions, as well as terminal constraints.
Before formally introducing our data-driven MPC, a prerequisite assumption on the pre-collected data is posed. Let L denote the prediction horizon of the MPC scheme. At the time instant when no DoS attack occurs (i.e., t = s r ), the MPC scheme predicts a trajectory of L steps in the future, i.e., from t to t + L − 1, and only the input obtained for time t will be used to control the system. According to Lemma 2, to be able to generate a predicted trajectory of length L, the pre-collected data should be persistently exciting of at least order L. To validate this requirement, we make the following assumption on the pre-collected data.
denote an input-output trajectory generated by the LTI system (3) from initial condition x s 0 , in which the input sequence {u s N } is persistently exciting of order L + n x + η, and the output sequence {y s N } is collected offline without network-induced noise n t .
Based on the assumption above, we build on the work of [32] and advocate the following data-driven MPC for control of unknown LTI systems without DoS attacks, which is solved at every time t ∈ N 0 .
where 1) Constraint (20a) is reminiscent of (15) in Lemma 2, whereū(t) = [ū −η (t), · · ·,ū L (t)] ∈ R nu(L+η) and y(t) = [ȳ −η (t), · · ·,ȳ L (t)] ∈ R ny(L+η) . To sustain feasibility of the optimization problem, a slack vector h(t) = [h −η (t), · · ·, h L (t)] ∈ R ny(L+η) is introduced to compensate for the network-induced noise n t ; 2) Constraints (20b) and (20c) use η input and output pairs to restrict the state x at time instants t and t + L − 1, which can be implemented thanks to the observability of the system. To be specific, Constraint (20b) is imposed to maintain the continuity of the true trajectory at time t, and Constraint (20c) ensures convergence of the predicted trajectories; 3) Constraint (20d) indicates that for i ∈ [0, L − 1], the control inputsū i are chosen from a given convex set U with 0 ∈ U, e.g., U = [−u max , u max ] for some u max ; 4) The cost function (ū,ȳ) is a quadratic stage cost given by (ū,ȳ) = ū 2 R1 + ȳ 2 R2 , where R 1 0, and R 2 0; the penalty term h(t) 2 enforces sparing use of slacks to produce solutions of minimal constraint violation; and the coefficient λ h > 0 balances between minimizing the cost and penalizing the constraint violation; and g(t) 2 with coefficient λ g > 0 is introduced to restrain the effect of process noise w t . Notice that the regularization coefficients of h(t) 2 and g(t) 2 also depend on the upper bound on the noise. This indicates that i) the slack variable h(t) decreases with the noise levelv; and ii) h(t) 2 is small enough compared with the λ gv 2 g(t) 2 /λ h , which is required to prove the system stability.
It is easy to see that all the constraints and the objective function are convex, so Problem (20) is convex and can be solved efficiently by means of off-the-shelf convex programming solvers.
Remark 6 (Comparison with the work [32]). Difference between our data-driven MPC scheme in (20) and that of [32] lies in two aspects. First, instead of an ideal system, we consider LTI systems containing process noise w t . In this setting, the Hankel matrix is a noisy one that does not contain exact system trajectories. Therefore, to invoke the Fundamental Lemma, inspired by [44], the error between the Hankel matrix constructed by the ideal input-output trajectory and the actual trajectory is characterized in the following proof. Moreover, the data-driven MPC problem in [32] is non-convex, which is NP-hard in general and computationally challenging. Inspired by [45], the cost function J * L in the present work is modified by adding noise bound as the coefficients of h(t) 2 and g(t) 2 . In this manner, the non-convex constraint h i (t) ∞ ≤n(1 + g(t) 1 ) (where · 1 , and · ∞ are the 1 -, and ∞ -norm of vectors, respectively) employed in [32] to guarantee closed-loop stability for their data-driven MPC, is not needed. Furthermore, the data-driven MPC scheme in (20) can also guarantee the system stability if the pre-collected output data is corrupted by noise, i.e.,ỹ s = y s +ñ. In this setting, a similar stability analysis can be conducted yet involving more complicated noise terms. For ease of exposition, the present work assumes that the pre-collected output is free from noise.
Upon solving (20), a future trajectory of length L is obtained. In addition, due to constraints (20b) and (20c), length L should be long enough. Therefore, the following assumption is made.
It is worth stressing that the proposed MPC in (20) requires no system matrices but only some input-output trajectories collected from the system (3) by means of off-line experiments. However, when the linear system is subject to DoS attacks, one may not be able to solve (20) at every time instant, since packets containing the last η outputs may not successfully arrive at the controller. To address the challenge emerged with missing packets due to the DoS attacks, the proposed datadriven MPC scheme is modified by virtue of the idea behind the predictor-based resilient controller in Section II-D. Specifically, when there is no DoS attack (i.e., t = s r ), the controller receives new output packets successfully from the plant, solves Problem (20), and uses the input obtained for time t as the control input. However, when a DoS attack occurs (i.e., t = s r ), if t−s r ≤ L, it simply sends the input for time t from the most recent solution of Problem (20); that is, for t ∈ [s r , s r +L], the first t − s r computed inputsū i (s r ) ∈ [0, t − s r ] are to be used sequentially when there is a DoS attack. On the other hand, if t > s r + L, i.e., no control input for time t has been computed from previous solving of (20), then zero inputs will be used until the next successful transmission comes and Problem (20) is solved again for new control inputs.
For reference, our proposed resilient data-driven control scheme is summarized in Algorithm 1.

10:
End if 11: End if 12: Set t = t + 1 and go back to 3.

B. Stability analysis
In this following, performance of the proposed data-driven resilient controller is analyzed. The stability analysis follows the same line as that of model-based resilient controller, in e.g., [14]. It proceeds in two steps. Similar to the model-based controller in Section II-D, we first show that the error between the predicted output by solving Problem (20) and the actual output is always bounded. Next, we construct a Lyapunov function, and establish the stability of system (3) with the devised data-driven resilient controller under conditions on the DoS attacks and level of noise.
Before proceeding, we define some variables that will be frequently used throughout the proof. According to (20b), at each time instant t, the most recent η inputs and outputs, i.e., [u [t−η,t−1] , ζ [t−η,t−1] ] , are used to initialize (the trajectory of) Problem (20), so its solution depends on ] . Moreover, it has been proved in [46] that the state x t−η of system (3) can be derived from u [t−η,t−1] and y [t−η,t−1] when system matrices (A, B, C) are known, and pair (C, A) is observable. are known. To this end, let us define the following augmented state vectors of the system In addition, let Γ z denote the linear transformation from z to an arbitrary but fixed state x that obeys a similar transformation expressed analytically using (A, B, C), i.e., x t = Γ z z t , and we have that x t ≤ γ z z t , where γ z := Γ z .
The following lemma provides an upper bound on the error between the predicted outputȳ and the actual output y.
Lemma 3 (Bounded output prediction error). Consider the system (3) with the controller in Algorithm 1. Suppose that Assumptions 1-7 hold. If i) DoS attacks satisfy Assumptions 4 and 5 with parameters ν d and ν f obey (12) and, ii) Problem (20) is feasible at s r , and J * L (z sr ) ≤J, then the error e y,t := y t −ȳ * t−sr (s r ) between the predicted output contained in the solution of (20) and the actual output satisfies e y,sr+q with a KL-function β 1 (v, q) defined by For n = 1, 2, · · · matrices Θ n and Υ n (I) are defined by Proof. It follows from (3) where and symbols I and 0 denote respectively identity and zero matrices with suitable dimensions. For n = 1, 2, · · · , matrix Υ n (B) is given by Let x s N := {x s t } N −1 t=0 and w s N := {w s t } N −1 t=0 denote the state trajectory and noise corresponding to the collected trajectory (u s N , y s N ), respectively, and one gets from (25) that Similarly, let (x s N , u s N ,ŷ s N ) denote a trajectory of the system (14), it can be derived that and substituting (30) into (29), we arrive at Let (ȳ * (s r ),ū * (s r ), g * (s r ), h * (s r )) denote an optimal solution of Problem (20) at time s r . It follows from (20a) that Sinceŷ s N is an output trajectory of system (14), it follows from Lemma 2 that H L+η (ŷ s N )g * (s r ) is a trajectory of system (14). If we letỹ = y − H L+η (ŷ s N )g * (s r ), andx t denote its corresponding state, then dynamics ofx t is given bỹ with initial output conditioñ Recursively, it can be obtained from (35) that yielding Based on (35) and (38), it follows recursively that Substituting (36) into (39), one has that Plugging these bounds into (40), leads to where the function β 2 (v, q) is a KL-function. Finally, combining (34) and (43), we deduce that is defined in (23).
So far, we have bounded the error between the predicted output by using the controller in Algorithm 1 and the actual output for the case of L ≥ T . When L < T , it follows from Algorithm 1 that zero inputs will be used once the L predicted control inputs are run out. Notice from (20c) that the last η predicted inputs are all zeros too. Hence, the established bound in (22) still holds for all t ∈ [s r + L, s r+1 ). Details of the proof for the case of L < T are thus omitted.
Remark 7 (Trade-off between level of noise and DoS). According to (23), the error between the estimated outputȳ * q (s r ) and the actual output y sr+q increases as q grows, and reset to a constant related to the noise bound at every successful transmission (i.e., q = 0). In addition, Lemma 1 indicates stronger DoS attacks lead to longer T ≥ s r+1 − s r , and hence larger q. Therefore, it suggests that, to stabilize systems under stronger DoS attacks, the level of noise w t and n t should be smaller. Therefore, there exists a trade-off between robustness against noise as well as resilience against DoS attacks.
Having bounded the prediction error, we analyze the closedloop stability of system (3) along with the proposed controller in Algorithm 1. To this end, let us begin by constructing a Lyapunov function. Based on the observability of state x and Definition 1, there exists a positive definite matrix P = P 0 such that W (z) = z P z is a UIOSS-Lyapunov function. Consider the following Lyapunov function accounting for both the data-driven MPC solution and the augmented system state where γ > 0 is any positive constant. The next lemma provides lower and upper bounds for this Lyapunov function in terms of the augmented state z t .
Lemma 4 (Bounds on the Lyapunov function). Consider the system (3) with the controller in Algorithm (1). Suppose that Assumptions 1-7 are met. If the parameters of DoS attacks satisfying (12), then there exist constant δ > 0 such that for all z sr ∈ B δ , Problem (20) is feasible, and the Lyapunov function V sr is bounded for r ∈ N 0 as follows where γ 3 is a constant, and α 3 (v) is a K ∞ -function.
Proof. Consider an arbitrary s r ∈ N 0 with r ∈ N 0 . Since J * L (z sr ) > 0, it follows from (44) that V sr ≥ γW (z sr ) ≥ γλ P z sr 2 . It remains to establish the upper bound in (45). To this end, let us start by constructing a candidate solution (ḡ(s r ),h(s r ),ū(s r ),ȳ(s r )) of Problem (20), in which, the input sequence is expected to bring the state x (and its corresponding output y) of system (3) to a ball around the origin whose size depends on the magnitude of noisev in L steps. In the following, we begin by choosingū(s r ) andȳ(s r ), which is followed by proving the existence ofḡ(s r ) andh(s r ) such that constraints in (20) are satisfied.

Based on (30), equation (20a) can be rewritten as
Combining (3) and (14) In addition, (48) indicates that Noticing from (20) that the coefficients for terms h (s r ) and ḡ(s r ) are λ h /v and λ gv , respectively. Therefore, to minimize the cost function J * L , the inequality (49) is naturally guaranteed, and a candidate solution of Problem (20) is constructed. Now, we are ready to upper bound V sr in terms of z sr and v. Since from the observability of system (3) we have that Therefore, ḡ(s r ) satisfies The first inequality is derived using the definition of 2-norm. Substituting (46) and (50) into the first inequality, we arrive at the second inequality. It follows from (49) that where γ 3 := λ {R1,R2} γ 2 uy γ 2 z + γλ P + λ g γ 1v + λ h γ 1 α 1 (v 2 )/v, and α 3 (v) := λ g γ 2v Now, based on Lemmas 3 and 4, our stability result is presented as follows.
Theorem 1. Consider the system (3) adopting the controller in Algorithm 1, and there exist a constant δ > 0 such that the initial condition z 0 ∈ B δ . Let Assumptions 1-7 hold. For any V in > 0, there exist positive constants λ g , λ g , λ h , λ h , andv 0 > 0 such that for all λ g ≤ λ g ≤ λ g , λ h ≤ λ h ≤ λ h , andv ≤v 0 , if i) the DoS attacks obey (12) in Lemma 1, ii) Problem (20) is feasible at s 0 , and the Lyapunov function satisfies V s0 ≤ V in , then the following statements hold true 1) Problem (20) is feasible at any successful transmission instant s r with r ∈ N 0 ; and, 2) System (3) is ISS under Algorithm 1.
Proof. We begin by proving 1), which is also known as Recursive feasibility.
The proof consists of two steps. In the first step, we show that if Problem (20) is feasible at s 0 , it is feasible at s 1 . In the second step, we prove that the Lyapunov function decreases at every successful transmission time instant, which indicates the recursive feasibility of Problem (20).
Step 1: First, we prove that Problem (20) is feasible at s 1 , by means of carefully constructing a candidate solution.
Case 1: Similar to the proof of Lemma 4, we first constructū,ȳ, and thenḡ andh can be derived using the constraints in Problem (20).
In addition, since x s0 ∈ B δ/γz , and the constraint (20c) is large, then constraint (20c) is violated). Consequently, ifv → 0, the output y [L−η−nx,L−η−1] (s 1 ) and its corresponding state x L−η−nx (s 1 ) approach to zero. In this setting, since the system is stabilizable, similar to (46), there exist an input trajectoryū [L−η−nx,L−η−1] (s 1 ) that brings the state and its corresponding output of the ideal system (14)ŷ to zero while obeying Based on this input-output pair,ḡ(s 1 ) andh(s 1 ) can be chosen following the same step from that of Lemma (4), i.e., and and hence the state x s0+L−η is close to zero whenv approaches to zero. In this setting, similar to that of Case(1), there exist an input trajectoryū [L−η−(s1−s0)],L−η−1] (s 1 ) that brings the state and its corresponding output of the ideal system (14)ŷ to zero while obeying Based on this input-output pair,ḡ(s 1 ) andh(s 1 ) can be chosen as,ḡ Case 3: s 1 − s 0 ≥ L. According to Lemma 3, the error bound between the predicted output and the actual output still holds true when s 1 −s 0 ≥ L. Therefore, a candidate solution can be constructed follows the same step as in the Case (2) and is omitted here.
Step 2: Next, leveraging the candidate solution constructed above, the recursive feasibility is proved by showing that the Lyapunov function decreases at every successful transmission instant. For simplicity, we only prove for Case (2), and the proof for Case (1) and (3) carry through. Suppose thatv 0 is sufficiently small such that candidate solution in Step 1 can be constructed. The optimal cost obeys (ū q (s 1 ),ȳ q (s 1 )) (59) In addition, the last term in (60) can be decomposed by For the second term in (61b), sinceȳ i (s 1 ) is constructed to be the output for the ideal system (14), the observability of the system indicates that In addition, noticing thatȳ * [L−η,L−1] (s 0 ) = 0, similar to Lemma 3, there exist a function α 4 ∈ K ∞ such that Therefore, leveraging (55), we arrive at which approaches to zero asv → 0. Next, we derive an upper bound for the term in (61c). Recall- In addition, Therefore, substituting (64) and (66) into (61), we one has that where is a K ∞ -function. Now, it remains to derive upper bounds for ḡ(s 1 ) and h (s 1 ) . From (56), one gets that where (72) holds true because of (55), and (73) is obtained by substituting (62) and (63) into (72). Based on (57a)-(57c), and noticing that s 1 − s 0 ≤ T from Lemma 1, one gets that together with (73) yielding where and α 6 is a K ∞function. Combining (69), (73) and (74), it can be obtained from (60) that Therefore, the Lyapunov function satisfies ). Further, adopting (45) in Lemma 4, and choosing γ x > 0 such that γ x z t ≤ x t , one gets that In conclusion, the Lyapunov function decreases at every successful transmission time instant, and the Problem (20) is feasible at s r for all r ∈ N 0 . s2) ISS Based on (75), it can be obtained recursively that Finally, adopting (45), we arrive at with function α 9 (v) ∈ K ∞ , which completes the proof according to Definition 1.
Remark 8 (Global ISS). In Theorem 1, z 0 ∈ B δ is required to establish the recursive feasibility. That is, system (3) achieves only local ISS under the proposed data-driven resilient controller in Algorithm 1. To recover global ISS, we provide next two solutions, each of which comes at the price of either reduced resilience against DoS attacks or increased computational complexity. The first solution is to solve Problem (20) once every n x time instants, and apply the control inputs in u [t,t+nx−1] =ū * [0,nx−1] (t) sequentially to the system over the ensuing n x steps. Under such a method, global recursive feasibility of Problem (20) can be shown similarly to that of Theorem 1, and the closed-loop system achieves global ISS provided that condition (1/ν f ) + (1/ν d ) < 1 − ((n x − 1)/ν f ) on DoS attacks is met. In addition, a data-driven MPC scheme without the terminal constraint (20c) was recently proposed in [45], under which global ISS can be ensured if the prediction horizon (i.e., L) is sufficiently large. Condition on L implies that this scheme also requires sufficiently many pre-collected trajectories (i.e., large N ). In this manner, system (3) can achieve maximum resilience against DoS attacks at the price of increased computational complexity. Stability analysis for these two schemes can be performed by leveraging the results in [32] and [45]. Remark 9 (DoS attacks also in controller-to-plant channel). When both controller-to-plant and sensor-to-controller channels are subject to DoS attacks, a packetized transmission policy can be used in the input channel too. At each successful transmission time instant, the plant receives a packet consisting of b inputs from the controller (i.e.,ū * 0,b−1 (s r )), where b is the buffer size at the plant side. Our proposed data-driven resilient controller along with the stability and robustness guarantees of this paper can be generalized to this case, and the trade-off between the buffer size b and DoS attacks can be characterized by the decrease rate and the increase rate of the Lyapunov function (c.f. [38]).

IV. NUMERICAL EXAMPLE
Consider the unstable batch reactor example in [14] (originally studied in [47]), where model-based resilient control was investigated under DoS attacks. This model is given bẏ x(t) = Ax(t) + Bu(t) and y = Cx(t), with Here, we consider a discrete-time version of the unstable batch reactor with a sampling period of 0.1s, and evaluate the resilient performance of the proposed controller. To this end, a number of input-output trajectories of length N = 100 were obtained by means of simulating the open-loop system off-line using input sequences obeying Assumption 6. Based on Assumption 7, parameters of Algorithm 1 were set as follows: L = 10 ≥ n x + 2η = 8, λ g = 0.1, λ h = 100, R 1 = 10 −4 I 2 , and R 2 = 3I 2 . Over a simulation horizon of 200 time instants, In addition, the identification step uses the same data as the datadriven method. The red dashed line (output using the proposed controller) in Figs. 2-4 confirmed that there is a trade-off between system resilience against DoS attacks and robustness against noise, which aligns with our observations in Remark 7. Compared with the data-riven method, the model-based method either using the controller in [14] or standard model predictive controller yields poorer system performance, which resembles the results in [44]. This is because the identification step tend to over-fit the noise in the pre-collected data when system dimension is high (e.g., n x ≥ 4). Furthermore, relationship between system performance, prediction horizon L, and length of the pre-collected data N is discussed in Fig. 5. It was shown in [22] that the length of pre-collected data should obey N ≥ (max{n u , n y } + 1)L + n x − 1 = 33. The top panel of Fig. 5 illustrates that when N is small (i.e., 33 < N ≤ 60), system performance improves fast as N increases; and when N becomes large, system performance remains almost steady as N increases. The bottom panel of Fig. 5 reports system performance for different L values. According to Assumption 7, the predicted horizon obeys 2η + n x ≤ L ≤ (N − n x + 1)/(max{n u , n y } + 1). Therefore, when N = 40, one gets that 8 ≤ L ≤ 12. It has been shown that, as long as the L and N are enough for evaluating Problem (20), they have little effect on the system performance. Finally, the bottom panel of Fig. 5 implies that when the dataset is small, the data-driven control method achieves better performance than using the model-based one.
V. CONCLUSIONS This paper considered the stabilization problem of unknown stochastic LTI systems under DoS attacks. A data-driven MPC scheme was developed, under which a sequence of inputs and associated predicted outputs can be computed purely from some pre-collected input-output data by solving convex programs. On top of this scheme, a data-driven resilient controller was proposed such that the system can achieve local input-to-state stability under conditions on the DoS attacks and level of noise, even without any knowledge of system model or a priori system identification procedure. Moreover, the condition on DoS attacks is the same as the maximum resilience achieved in existing works under model-based controller. To achieve global stability, two modifications of the proposed controller were discussed at the price of sacrificing system resilience against DoS attacks, or increasing computational complexity. Finally, a numerical example was provided to demonstrate the effectiveness of the proposed method as well as the practical merits of the established theory.