{'fraction_non_alphanumeric': 0.047410858269127394, 'fraction_numerical': 0.01501523024547572, 'mean_word_length': 4.3103710751665085, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 9, '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}}
Distributed State Estimation with Deep Neural Networks for Uncertain Nonlinear Systems under Event-Triggered Communication

Distributed state estimation is examined for a sensor network tasked with reconstructing a system's state through the use of a distributed and event-triggered observer. Each agent in the sensor network employs a deep neural network (DNN) to approximate the uncertain nonlinear dynamics of the system, which is trained using a multiple timescale approach. Specifically, the outer weights of each DNN are updated online using a Lyapunov-based gradient descent update law, while the inner weights and biases are trained offline using a supervised learning method and collected input-output data. The observer utilizes event-triggered communication to promote the efficient use of network resources. A nonsmooth Lyapunov analysis shows the distributed event-triggered observer has a uniformly ultimately bounded state reconstruction error. A simulation study is provided to validate the result and demonstrate the performance improvements afforded by the DNNs.


I. INTRODUCTION
A wireless sensor network (WSN) is defined as a multiagent system composed of autonomous sensors scattered over an area to monitor desired phenomena and connected through wireless communication links [1]. By sharing partially observable state measurements of a system with their neighbors and leveraging a consensus algorithm, WSNs are capable of estimating the state of a system in a distributed fashion [2]. This technique is called distributed state estimation, and it allows each sensor in the WSN to reconstruct the entire system state through local and cooperative information sharing despite each agent only being able to measure part of the system's state. Distributed state estimation does not require a data fusion center; therefore, it is a preferable state estimation strategy since it can better accommodate each agent's limited computing capacity, eliminate single points of failure, and promote scalability.
In [3], the authors developed a decentralized consensusbased observer capable of performing stable distributed state estimation using adaptive weights that were generated by solving a semi-definite program. Given that agents within a WSN may be powered by limited portable energy sources, results like [4] and [5] developed distributed state estimation strategies with event-triggered communication as a means to conserve energy and network resources. Similarly, the authors in [6] developed a distributed state observer with stochastic eventtriggered communication for a linear time-varying system, which improves upon [3]- [5].
While results such as [3]- [6] provide valuable contributions towards the literature on distributed state estimation, these results, like many of the techniques in [2], are focused on known linear systems. Results on distributed state estimation for systems with uncertain and/or nonlinear dynamics are scarce but well motivated. Additionally, the improved computing power of modern processors along with data availability encourages the development of a distributed observer capable of employing machine learning techniques as a means to improve state reconstruction. However, the update laws used to train the weights and biases of deep neural networks (DNNs) do not typically have a stability analysis, which has mitigated their use for online estimation and control. Conversely, in this paper, we develop a Lyapunov-based update law for the outer weights of a DNN and prove the stability of the DNN-based function approximator for an uncertain nonlinear system.
Recently, the authors in [7]- [9] developed a model reference adaptive control architecture that utilizes a DNN as the adaptive element while ensuring that the estimation error is uniformly ultimately bounded (UUB) via a Lyapunov-based stability analysis. These works are among the first to employ DNNs for real-time control while providing a formal stability assurance. The key innovation lies in the update of the DNN weights. The outer layer weights evolve according to a realtime analysis-based update law that ensures stability, and the inner layer weights are modified using batch updates. Based on this observation, the authors in [10] developed a DNN adaptive controller for an uncertain nonlinear dynamical system capable of asymptotically tracking a desired trajectory. In this result, the outer layer weights of the DNN are updated in real-time using a Lyapunov-based update law, while the inner layer weights are updated using a data-driven supervised learning algorithm, i.e., the Levenberg-Marquardt algorithm. The results in [7] and [10] show that multiple timescale learning with DNNs can yield improved performance when compared to traditional adaptive techniques.
Results such as [11]- [13] provide alternative methods of employing DNNs for control and estimation. The work in [11] developed a stabilizing regulator for a known discrete-time nonlinear system using a receding-horizon optimal control scheme. The proposed feedback control law is computed offline, where a DNN is used to approximate the recedinghorizon regulator. In [12], a model predictive control (MPC) policy for a known linear parameter-varying system is approximated using a DNN that is trained online with supervised learning. The authors in [13] provide a DNN-based strategy to approximate an MPC control policy for a known linear system that reduces memory requirements when compared to other approximation techniques. While these methods provide computationally efficient control strategies, they are not readily applicable to uncertain nonlinear systems. Inspired by [6], [7], and [10], we develop an adaptive eventtriggered distributed state observer that utilizes DNNs as a means to improve state reconstruction for an uncertain nonlinear system. Using a nonsmooth Lyapunov stability analysis, we prove that our observer is capable of UUB state reconstruction while being robust to a bounded exogenous disturbance. Similar to [7] and [10], we develop a multiple timescale learning strategy. In particular, the outer layer weights of each DNN are adjusted online using a Lyapunov-based update law that uses real-time feedback to ensure stability, while the inner layer weights and biases are updated offline using a supervised learning algorithm with collected input-output data. The theoretical findings of our work are validated through a simulation study. The observer is capable of reducing the root-mean-square state estimation error of each agent in the WSN by approximately 60% when compared to an identical simulation, where the DNN inner weights and biases are held constant.
The rest of the paper is organized as follows. Section II introduces notation and necessary concepts about graphs. Section III introduces the system model and the sensor network. Section IV precisely formulates the goal of this work. Section V develops the proposed observer and closed-loop dynamics of the error system encoding the state reconstruction error. Sections VI and VII prove the UUB state reconstruction of the proposed observer and investigate the performance of the development, respectively. Section VIII summarizes this work and suggests possible future directions.

A. Notation
Let R and Z denote the set of real numbers and integers, respectively. We also write R ≥x For p, q, n, u, v ∈ Z >0 , the p × q zero matrix and the p × 1 zero column vector are denoted by 0 p×q and 0 p , respectively. The p × p identity matrix and the p × 1 column vector of ones are denoted by I p and 1 p , respectively. The Euclidean norm of a vector r ∈ R p is denoted by r √ r r. Given a positive integer M , let [M ] {1, 2, ..., M }. The Kronecker product of A ∈ R p×q and B ∈ R u×v is denoted by (A ⊗ B) ∈ R pu×qv . The block diagonal matrix whose diagonal blocks consist of G 1 , G 2 , ..., G n is denoted by diag (G 1 , G 2 , ..., G n ). The i th , maximum, and minimum eigenvalues of a symmetric matrix G ∈ R p×p are denoted by λ i (G) ∈ R, λ max (G) ∈ R, and λ min (G) ∈ R, respectively. The trace of a square matrix A ∈ R p×p is denoted by tr(A). Let vec(·) denote the vectorization transformation that converts a matrix into a column vector. The symbol L ∞ denotes the set of essentially bounded measurable functions, i.e., given the Lebesgue measurable function f : R → R, f ∈ L ∞ if and only if inf {C ≥ 0 : |f (x)| ≤ C for almost every x∈R} ∈ R ≥0 . The symbol • denotes function composition, i.e., given suitable functions f and g, (f • g)(x) = f (g(x)).

B. Graphs
Let G (V, E, A) denote a static, weighted, and undirected graph with node set V [N ], for some N ∈ Z >0 , edge set E ⊆ V × V, and symmetric weighted adjacency matrix A [a ij ] ∈ R N ×N . The edge (i, j) ∈ E if and only if node i can send information to node j. Since G is undirected, (i, j) ∈ E if and only if (j, i) ∈ E. An undirected graph is connected if and only if there exists a sequence of edges in E between any two distinct nodes. The neighbor set of node i is denoted by N i {j ∈ V : (j, i) ∈ E}. Within this work, no selfloops are considered, and therefore, a ii 0 for all i ∈ V.
The Laplacian matrix of G is denoted by L ∈ R N ×N and defined as L ∆ − A.

III. SYSTEM DYNAMICS AND NETWORK TOPOLOGY
Consider a system whose uncertain model is given bẏ where x 0 : [0, ∞) → R n denotes the state, f : R n → R n denotes the uncertain nonlinear dynamics, and d : [0, ∞) → R n denotes an exogenous disturbance. Furthermore, consider a sensor network composed of N agents, which are indexed by V. For each i ∈ V, agent i is capable of continuously measuring the output y i : [0, ∞) → R m , where the output measurement is given by such that C i ∈ R m×n denotes the known output matrix of agent i. The agents in the sensor network may have different sensing capabilities, where each agent may be able to measure a different component of the system's state. Each agent is also capable of intermittently communicating with its neighbors, where the flow of information between the agents in the sensor network is modeled through the static and undirected communication graph G = (V, E, A). 1 The following assumptions are used in the development of the result.
Assumption 1. The function f is locally Lipschitz.
Assumption 2. The disturbance is continuous and bounded, i.e., there exists a d max ∈ R >0 such that d(t) ≤ d max for all t ≥ 0.
Assumption 3. The communication graph G is connected for all t ≥ 0.

IV. OBJECTIVE
The objective is to develop a distributed observer capable of reconstructing the state of an uncertain nonlinear dynamical system. The distributed observer must also be event-triggered to promote the efficient use of network resources. Furthermore, we wish to design an observer that concurrently utilizes online and offline learning strategies to ensure stability and enable improved state reconstruction. To quantify the objective, let the state estimation error e 1,i : The estimated output of the system with respect to agent i is denoted byŷ i : [0, ∞) → R m , where the output estimation error e 3,i : [0, ∞) → R m is defined as Contrary to (3), the sampled state estimation error e 2,i (t) and the output estimation error e 3,i (t) are both measurable by agent i, where e 3,i (t) is used to drive the estimate of agent i towards the state of the system. Given the state estimation error in (3), the sensor network is said to have successfully reconstructed the state of the system whenever for some user-defined ε > 0.
be an increasing sequence of event-times for agent i, where t i k denotes the k th instance agent i samples and broadcasts its state estimate of the system in (1) to all agents j ∈ N i . Note that the broadcast information is received by all neighbors simultaneously, i.e., we assume perfect communication. The sampled state estimate of the system as computed by agent i is defined as 2 Assumption 4. The state of the system in (1) evolves within a compact set D ⊂ R n for all time, i.e., x 0 (t) ∈ D for all t ≥ 0.
Since the nonlinear function f is continuous and x 0 (t) is contained within a compact set by Assumption 4, we can invoke the Stone-Weierstrass Theorem to express the nonlinear dynamics in (1) within D as where W 0 ∈ R L×n denotes the ideal outer layer weight matrix, σ : R p → R L denotes a vector containing bounded continuous activation functions 3 , Φ : R n → R p encodes the ideal inner DNN, and ε : R n → R n denotes the bounded function reconstruction error [14,Theorem 7.32]. Note that W 0 , Φ, and ε are unknown. The ideal inner DNN can be expressed as where ∈ Z ≥1 denotes the number of user-defined inner layers of the DNN, q ∈ [ ], W q ∈ R Lq×nq+1 denotes the ideal weight matrix for the q th inner layer, and φ q : R nq → R Lq denotes a vector function composed of scalar basis functions corresponding to the q th inner layer. Note that n 1 = n and n +1 = p. Moreover, for each q ∈ [ ], W q is unknown. Using (8), the system model in (1) can be expressed aṡ Based on (10) and the subsequent stability analysis, the distributed observer of agent i ∈ V is defined aṡ where W i : [0, ∞) → R L×n denotes the estimated outer weight matrix of the system as computed by agent i, Φ i : R n → R p encodes the estimated inner DNN computed by agent i, and K 1 ∈ R n×n is the symmetric solution to the bilinear matrix inequality .., C N ) ∈ R mN ×nN denotes the output matrix of the sensor network, and k 1 ∈ R >0 is a user-defined parameter. The bilinear matrix inequality in (12) encodes an observability condition that originates from the subsequent stability analysis (see Section VI). The estimated inner DNN Φ i (x i (t)) is modeled as a piecewise continuous function that is similar to (9), where T i p denotes the p th instance agent i updates its DNN by training on collected input-output data. Hence, the set of discontinuities of Φ i (x i (t)) is given by {T i p } ∞ p=1 . Remark 1. Agent i may collect input-output data from the system in (1) and train a new inner DNN while the weights and biases of the previous inner DNN are held constant. Once training is complete, the new inner DNN can be switched in via (11) [10].
The error between the ideal outer weight matrix and the estimated outer weight matrix of agent i, i.e., Since the ideal outer weights are unknown, W i (t) is not measurable. Based on the subsequent Lyapunov stability analysis, the outer weight update law of agent i, which is embedded within the continuous projection operator denoted by proj(·, ·) and defined in [15,Equation 4], is designed as 4 where Γ i ∈ R L×L is a user-defined positive definite matrix used to adjust the learning rate of the outer layer weights for the DNN of agent i. Moreover, since the inner DNN is treated as an arbitrary piecewise continuous function, the user is free to employ virtually any offline training policy. An example policy is discussed in Section VII and additional training strategies can be found in [8] and [9]. Using (2), (3), and the definition ofŷ i (t) in (11), e 3,i (t) can be alternatively expressed as Substituting (3) and (4) into the definition of z i (t) in (11) yields z i (t) = j∈Ni a ij (e 1,j (t) − e 1,i (t)) + j∈Ni a ij (e 2,j (t) − e 2,i (t)).
(16) The expression in (16) is not measurable since it contains state estimation errors for agents j ∈ N i ∪ {i}. However, the expression for z i (t) in (11) is measurable and equivalent to (16), where (16) is used in the analysis. The closed-loop error dynamics of e 1,i (t) can now be determined by substituting (10)-(13), (15), and (16) into the time derivative of (3), when it exists, while adding and subtracting W 0 σ( Φ i (x i (t))) to obtaiṅ 4 The projection operator is used to ensure W i (t) remains within the set To express the subsequent development in a compact form, let e 1 (t) [e 1,1 (t), e 1,2 (t), ..., e 1,N (t)] ∈ R nN , e 2 (t) [e 2,1 (t), e 2,2 (t), ..., e 2,N (t)] ∈ R nN , e 3 (t) [e 3,1 (t), e 3,2 (t) , ..., e 3, The block diagonal matrix composed from the DNN outer weight errors is Similarly, the block diagonal matrix consisting of the DNN outer weight estimates is ) for every agent i ∈ V. The block diagonal matrices consisting of {Γ i } i∈V and the DNN components of all agents prior to being multiplied by their corresponding outer weights are denoted by Using (17) and the stacked expressions for e 1 (t), e 2 (t), χ(t), C, W (t), W (t), and σ( Φ(x(t))), the closed-loop dynamics of e 1 (t) arė Since W 0 is a fixed matrix, σ(·) is a bounded function, the function reconstruction error ε is bounded, and the disturbance is bounded given Assumption 2, there exists a constant χ max ∈ R >0 such that χ(t) ≤ χ max for all t ≥ 0. Moreover, from (16), it follows that z(t) can be expressed as Using (19) and Young's inequality, it follows that which is a useful inequality employed in the development of the event-trigger mechanism for the sensor network.
The event-times {t i k } ∞ k=0 that dictate when agent i samples and broadcasts its state estimatex i (t), as outlined in (7), are generated by the event-trigger mechanism (21) Since k 2 and κ are positive, φ 1 > 0 and φ 2 > 0. 5 Moreover, the event-trigger mechanism in (21) originates from the subsequent stability analysis. Notice that (21) requires each agent to sample their state estimate whenever the error between the sampled and continuous estimates becomes sufficiently large. Theorem 1. The observer in (11) and update law in (14) for each i ∈ V ensure the state estimation error e 1 (t) is UUB in the sense that provided Assumptions 1-4 are satisfied, there exists a matrix K 1 satisfying the bilinear matrix inequality in (12), and agent i broadcasts its state estimate as determined by the event-trigger mechanism in (21) for each i ∈ V.
Theorem 2. The difference between consecutive broadcast times generated by the event-trigger mechanism of agent i ∈ V in (21) is uniformly lower bounded by for all instances k ∈ Z ≥0 , where e max 2,i ∈ R >0 is a bounding constant such that W i (t) σ( Φ i (x i (t))) + K 1 z i (t) + K 1 C i e 3,i (t) ≤ e max 2,i and φ 1 is a constant defined in (21). Proof. Let t ≥ t i k ≥ 0 and i ∈ V. Substituting (11) into the time derivative of (4) yieldṡ where ė 2,i (t) a.e. ≤ W i (t) σ( Φ i (x i (t))) + K 1 z i (t) + K 1 C i e 3,i (t) . Recall that z i (t) ∈ L ∞ and e 3,i (t) ∈ L ∞ from the proof of Theorem 1. Moreover, W i (t) and σ( Φ i (x i (t))) are bounded by construction. Therefore, there a.e.
. Using e 2,i (t) ≤ e max 2,i (t − t i k ) and the triggering condition in (21), the inequality in (37) follows.

VII. SIMULATION RESULTS
To examine the performance of the developed estimation strategy, two numerical simulations are provided for a Van der Pol oscillator, where the model in (1) is used with x 0 (t) [x(t), y(t), z(t)] ∈ R 3 , and µ = 0.3. The disturbance affecting the system is given by The sensor network used to reconstruct the state of the system consists of three agents, where the output matrix of Agents 1, 2 and 3 are C 1 = [1 0 0], C 2 = [0 1 0], and C 3 = [0 0 1], respectively. Hence, each agent can measure one component of the system's state, and all agents cover the entire state of the system. Preliminary observations show that the bilinear matrix inequality in (12) has a solution whenever the combined output measurements of the agents cover the entire system state and the graph G is connected. The adjacency matrix of the sensor network is where Agent 1 can communication with Agents 2 and 3, but Agents 2 and 3 can only communicate with Agent 1. The first simulation investigates the performance of the observer when the weights and biases of all inner DNNs are held constant and only the outer weights of the DNNs are updated to ensure stability. The second simulation is identical to the first with the exception that the weights and biases of all inner DNNS are updated using input-output data. The simulation parameters, used in both simulations, are N = 3, κ = 1, = 3 × 10 3 , Γ = 3I 3 , ρ = 2, δ = 0.3, and k 2 = 10. Therefore, k 1 = 23.3, where the CVX MATLAB toolbox in [18] and [19] was used to compute a K 1 that satisfies (12) as Each agent used a 5-layer DNN to approximate the system dynamics. Layers 1-3 each consist of 12 nodes, Layer 4 consists of 5 nodes, and Layer 5 consists of 3 nodes. Each layer is affine, i.e., each activation function is scaled by a weight and shifted by a bias, and all nodes use the tangent-sigmoid activation function. Layers 1-4 used weights and biases, while Layer 5 only used weights (biases set equal to zero). Given the model in (38), the dimension of the input and output of each agent's DNN is 3. As the outer weights of agent i's DNN are updated online using (14), the user is free to specify an offline update procedure for the weights and biases of the inner DNN. This decoupling in training structure leads to a multiple timescale adaptation technique. Additional information about such methods can also be found in [7] and [10].
Input-output data and the Levenberg-Marquardt algorithm are used by the Deep Learning MATLAB toolbox in [20] to train the weights and biases of the inner DNN for each agent. Ideally, each agent would utilize x 0 (t) as input data andẋ 0 (t) − d(t) as output data to train the inner DNN approximation of f . However, each agent does not have access to x 0 (t),ẋ 0 (t), and d(t). Therefore, the input-output data used to train Layers 1-4 of the DNN for agent i arex i (t) andẋ i (t). Given a continuously differentiable function, such as the DNN of agent i with fixed weights and biases, and labeled input-output data, the Levenberg-Marquardt algorithm identifies a local minimizer for the nonlinear least squares problem formed from the given model and data. The algorithm is a combination of gradient descent and the Gauss-Newton method, which leads to efficient computation [21]. Because the Levenberg-Marquardt algorithm relies on labeled input-output data, i.e., each input corresponds to a known particular output, the algorithm can be considered a supervised learning strategy.
The learning rate, i.e., the step size used to train the inner DNN weights and biases at each iteration, was lower bounded by 10 −3 . The loss function used for training was the mean squared error (MSE) between the estimated output generated by a known input and the corresponding known output. Each training iteration was set to last until the MSE was less than 10 −2 or a maximum of 25 training epochs had elapsed. For each training iteration, 70% of the data was used for training, 15% was used for validation, and 15% was used for testing. The weights and biases of Layers 1-4 for all DNNs were initialized as 0.1. The weights of Layer 5 for the DNN of each agent were identically initialized as For the second simulation, data collection and training were performed by each agent during the first half of the simulation, and the resulting DNN model was implemented during the second half of the simulation. Specifically, each agent collected data during t ∈ [10,16] and trained their inner DNN during t ∈ [16,20]. Each agent then implemented their updated inner DNN model for t ≥ 20. While data collection can begin at any time, we observed improved state reconstruction after the transient response elapsed.
The results of the simulations are illustrated in Figures  1-3 and Table I. Note that although the agents performed data collection, training, and implementation in a synchronous manner for simplicity, asynchronous learning cycles can also  When t = 10, as denoted by the black dashed line, each agent begins collecting input-output data. Each agent stops their data collection process when t = 16, which is denoted by the solid black line. For t ∈ [16,20], each agent uses their collected data to train their inner DNN weights and biases, where training stops and the new DNN of each agent is switched in at t = 20 according to (11). The red dashed line corresponds to the DNN implementation time of each agent.
be employed. Figure 1 shows the norm of the state estimation error of all agents, where the weights and biases of Layers 1-4 are held constant and only the weights of Layer 5 are updated. Similarly, Figure 2 shows the norm of the state estimation error of all agents, where the weights and biases of Layers 1-4 and the weights of Layer 5 are updated. The black dashed line, black solid line, and red dashed line in Figure 2 denote the start of the data collection process, the end of the data collection process and beginning of the training process, and the end of the training process and DNN application time, respectively. Figure 3 shows the event-times of each agent for t ∈ [19.75, 20.25] for the second simulation. The average difference between consecutive broadcast times for Agents 1, 2, and 3 were 0.0047, 0.0089, and 0.0095 time units, respectively, where no significant difference between broadcast times for the two simulations was observed. Table I lists the root-mean-square error (RMSE) of e 1,i (t) for each agent during t ≥ 20 for both simulations. Table I also lists the percent change between the two RMSE statistics, where the RMSE without DNN learning and with DNN learning define the initial and final values, respectively, used in the percent change computation. Figure 2 and Table I demonstrate that the multiple timescale learning strategy can provide significant improvements in state reconstruction. A single training iteration of the inner DNNs reduced the RMSE of the state estimation error by approximately 60% for each agent. While additional training iterations could have been performed, a single iteration is simulated since additional training cycles produced minimal improvements in state reconstruction for this case. The root-mean-square of e 1,i (t) for each agent is presented for both simulations, which was computed for t ∈ [20,40].

VIII. CONCLUSION
An adaptive event-triggered distributed state observer for a sensor network is developed, which is capable of reconstructing the state of an uncertain nonlinear system while being robust to a bounded disturbance. A DNN is used by each agent in the sensor network to approximate the uncertain nonlinear system dynamics from input-output data. The inner layer weights and biases are trained using the Levenberg-Marquardt algorithm in an offline manner, while the outer layer weights are updated using an analysis-based update law and real-time feedback. The result is a multiple timescale learning strategy. A nonsmooth Lyapunov stability analysis is provided that indicates the system's state can be uniformly reconstructed to within an ultimate bound.
As seen in Figure 1, the observer drives the state reconstruction error for each agent below unity, which implies that the observer is capable of good performance without DNNs and that the observer parameters can be relaxed to decrease the frequency of communication. With respect to Figures 1 and 2, it is evident that the use of DNNs allowed each agent to reduce their state reconstruction error by a substantial margin (approximately 60% reduction). Moreover, the improvement in performance only required a single learning cycle, where additional learning cycles can be executed as necessary. A key observation noted during the simulation study is that training DNNs with data collected during the transient response leads to smaller performance improvements when compared to training using data collected during steady state. Furthermore, higher quality data, such as that generated from frequent communication, leads to improved performance. Future pursuits that could build on this result include using multiple DNNs to learn the system dynamics and disturbance separately, developing distributed consensus algorithms that share local weights and biases from the DNNs, and exploring the trade-off between triggering and state reconstruction using DNNs.