{'fraction_non_alphanumeric': 0.035765923445704284, 'fraction_numerical': 0.01438246708774066, 'mean_word_length': 4.0563678337822235, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Excitation and Measurement Patterns for the Identifiability of Directed Acyclic Graphs

This paper deals with the design of Excitation and Measurement Patterns (EMP) for the identification of a class of dynamical networks whose topology has the structure of a Directed Acyclic Graph (DAG). In addition to the by now well known condition that the identifiabiltiy of any dynamical network requires that the sources be excited, the sinks be measured, and all other nodes be either excited or measured, we show that for DAGs two other types of nodes have special excitation and measurement requirements. Armed with this result, we propose a systematic procedure for the design of EMPs that guarantee identifiability of a network with DAG topology.


I. INTRODUCTION
This work deals with identifiability of dynamic networks, which has been an active research topic in the control community over the last ten years. The network framework used here was introduced in [1] where signals were represented as nodes of the network which were related to other nodes through transfer functions. These networks can be interpreted as directed graphs where the transfer functions, also called modules, are the edges of the graph and the node signals are the vertices.
In [1] it was assumed that all nodes are excited and measured. As a result, an input-output matrix of the network, denoted T (z), can be defined, which can always be identified from these data. The network identifiability question is then whether the network matrix, denoted G(z) (whose elements are the transfer functions relating the nodes) can be recovered from this closed-loop transfer matrix T (z). In subsequent work, a range of new objectives were defined, from the identification of the whole network to identification of some specific part of the network [1]- [9]. As for the assumptions on the signals, up to 2019, all contributions assumed that either all nodes are excited, or all nodes are measured. A typical question would be: given that all nodes are excited, Eduardo  which nodes must be measured in order to identify the whole network?
The first identifiability results for networks where not all nodes are excited AND not all nodes are measured were presented in [10]. That paper first provided a necessary condition for identifiability of any network: each node must be either excited or measured, at least one node must be excited and at least one node measured. The paper [10] also presented identifiability conditions for two special classes of networks, namely trees and loops.
The results of [10] inspired the definition of an excitation and measurement pattern (EMP), namely the combination of excited nodes and measured nodes. The concept of EMP was introduced in [11] where an EMP was called valid if it guarantees the identifiability of the whole network. An EMP was called minimal if it guarantees the identifiability of the network using the smallest possible combination of excited and measured nodes [11]. This number is the cardinality of the EMP. Achieving identifiability of a network with a minimal EMP is of both theoretical and practical interest. The excitation of a node typically requires an actuator, while its measurement requires a measurement device. On the other hand, having some flexibility in the choice of a valid EMP is also of practical interest. It may be that exciting node 42, say, is prohibitively expensive while its measurement is easy; conversely, measuring a node may be difficult while its excitation is cheap. In evaluating the choice of an EMP for the identification of a network, one must of course remember that each node must be either excited or measured, or both. As a result, the cardinality of a valid EMP is always at least equal to n, the number of nodes.
The search for valid, and possibly minimal, EMPs began by looking at special structures. In [10] a necessary and sufficient condition was given for the identifiability of a tree, which shows that a tree can possibly be identified with an EMP of cardinality n. In [12] necessary and sufficient conditions were derived for the identifiability of some classes of parallel networks. In [13] necessary and sufficient conditions were given for the identifiability of loops. This result showed that any loop with more than 3 nodes can also be identified with a minimal EMP of cardinality n. In addition, it was shown that constructing EMPs for loops is very easy and that the number of minimal EMPs grows very quickly with the number of nodes.
In this paper, we generalize the results derived in [10] for the identification of trees to a much wider class of networks, namely those that have the structure of a Directed Acyclic Graph (DAG), i.e. a directed graph that has no cycles. DAGs have been widely studied in the literature [14]. A specific feature of a DAG is that the corresponding network matrix G(z) can be rewritten in a lower triangular form via a relabeling of the nodes. The corresponding input-output transfer matrix T (z) is then also lower-triangular and this greatly simplifies the relations between the elements G ij of the network matrix and the elements T ij of this transfer matrix.
The main contributions of this paper are as follows. First we provide an explicit solution for the elements G ij (z) as a function of elements of the matrix T (z) and elements of its inverse: S(z) = T −1 (z), with the property that the elements S ij (z) of S(z) are expressed in terms of T kl only (i.e. they do not involve inverses of elements T kl ). Next we focus on the construction of valid EMPs for the identification of a DAG. We provide a necessary condition on the excitation and measurement of specific nodes within a DAG. Finally, we provide a simple procedure for the construction of a valid EMP for the identification of a DAG.
The paper is organized as follows. In Section II we introduce the notations, and recall the definitions of generic identifiability of a network, and of a valid, as well as a minimal, Excitation and Measurement Pattern. We also recall the main necessary condition for identifiability of any network. In Section III we present networks that have the topology of Directed Acyclic Graphs and establish the key results that will allow one to identify such networks. In Section IV we establish necessary conditions for the identifiability of a DAG. The results of Sections III and IV allow us to propose, in Section V, a recursive procedure for the construction of a valid EMP, i.e. one that secures identifiability of the network. Finally, we present conclusions in Section VI.

II. DEFINITIONS, NOTATIONS AND CONCEPTS
In this Section, we briefly state the identifiability problem for a dynamical network and recall the main necessary condition for the identifiability of any such network. We then define the concept of a valid Excitation and Measurement Pattern, namely a choice of excited nodes and measured nodes that guarantee identifiability. We also introduce the notations used throughout the paper.
We consider dynamic networks composed of n nodes (or vertices) which represent internal scalar signals {w k (t)} for k ∈ {1, 2, . . . n}. These nodes are interconnected by discrete time transfer functions, represented by edges, which are entries of a network matrix G(z). The dynamics of the network is given by the following equations: where w(t) ∈ R n is the node vector, r(t) ∈ R m is the input and y(t) ∈ R p is the network's output. The matrix B ∈ Z n×m 2 , where Z 2 {0, 1}, is a binary selection matrix with a single 1 and n − 1 zeros in each column; it selects the inputs affecting the nodes of the network. Similarly, C ∈ Z p×n 2 is a matrix with a single 1 and n − 1 zeros in each row that selects which nodes are measured.
We now introduce some definitions and notations concerning these dynamical networks and their network matrix G(z). To each G(z) we can associate a directed graph G defined by the tuple (V, E), where V is the set of vertices and E ⊆ V × V is the set of edges. The graph G defines the topology of the network. A particular transfer function G ji (z) of the network matrix is called an incoming edge of node j and outgoing edge of node i. For the graph G associated to the network matrix G(z) we introduce the following notations.
• W -the set of all n nodes; • B -the set of excited nodes, defined by B in (1a); • C -the set of measured nodes, defined by C in (1b); • F -the set of sources: nodes with no incoming edges; • S -the set of sinks: nodes with no outgoing edges; • I -the set of internal nodes, i.e. nodes that are neither a source nor a sink: I W\(F ∪ S); • N − j -the set of in-neighbors of node j; • N + j -the set of out-neighbors of node j. Additionally, we introduce the following two types of nodes.
• A node j is called a dource if it has at least one outneighbor that is connected to all in-neighbors of j; • A node j is called a dink if it has at least one in-neighbor that connects to all out-neighbors of j.
The following assumptions are made about the network matrix: • the diagonal elements are zero; • (I − G(z)) −1 is proper and stable. One can represent the dynamic network in (1a)-(1b) as an input-output model as follows where Observe that the matrix T (z) is nonsingular by construction. It is assumed that the input-output model M (z) is known; the identification of M (z) from input-output (IO) data {y(t), r(t)} is a standard identification problem, provided the input signal r(t) is sufficiently rich. The question of identifiability of the network is whether the network matrix G(q) can be fully recovered from the transfer matrix M (z). We now give a formal definition of generic identifiability of the network matrix from the data {y(t), r(t)} and from the graph structure.
Definition II.1. ( [5]) The network matrix G(z) is generically identifiable from excitation signals applied to B and measurements made at C if, for any rational transfer matrix parametrization G(P, z) consistent with the directed graph associated with G(z), there holds for all parameters P except possibly those lying on a zero measure set in R N , whereG(z) is any network matrix consistent with the graph.
In this paper, we discuss the identifiability in terms of which nodes must be excited and/or measured in the subsets B and C in order to guarantee identifiability of the network. This approach is inspired by [3] and a recent result in [10], which gives a necessary condition for generic identifiability of a network.
As a consequence, every node of the network must be either excited or measured. Generic identifiability of a given network can thus be equivalently characterized by the network's Excitation and Measurement Pattern, denoted EMP. The concept of EMP, which led to the concept of minimal EMP, was introduced in [11]. They are defined in the following.
Definition II.2. A pair of selection matrices B and C, with its corresponding pair of node sets B and C, is called an excitation and measurement pattern -EMP for short. An EMP is said to be valid if it is such that the network (1a)-(1b) is generically identifiable. Let ν = |B| + |C| 1 be the cardinality of an EMP. A given EMP is said to be minimal if it is valid and there is no other valid EMP with smaller cardinality.
The following result establishes a lower and upper bound for the cardinality of a valid EMP for any network.
Theorem II.1. The cardinality of a valid EMP for the identification of a dynamical network with n nodes is at least equal to n and at most equal to 2n − f − s, where f is the number of sources and s the number of sinks.
Proof. The lower bound results from Proposition II.1; it can actually be achieved for trees and loops [10], [13]. As for the upper bound, we know by Proposition II.1 that all sources must be excited and all sinks measured, while the remaining n − f − s nodes must be excited or measured. Assuming that these are all excited and measured, then the cardinality of the From now on, we drop the arguments z and t used in (1a)-(1b) whenever there is no risk of confusion.

III. DIRECTED ACYCLIC GRAPHS AND THEIR PROPERTIES
In this section we investigate the generic identifiability of dynamic networks whose topologies are associated with directed acyclic graphs, denoted DAG 2 . These are very general classes of graphs, of which trees are a special case. We will derive necessary and sufficient conditions for the generic identifiability of these classes of networks and characterize which nodes need to be excited or/and measured in order to obtain a valid EMP for these networks. Directed Acyclic Graphs are defined as follows.
Definition III.1. A directed acyclic graph is a directed graph that has no cycles.
A property of DAGs is that the sequence of their nodes can be relabeled by a topological sorting algorithm [15] in such a way that G ij = 0 for i < j. In the sequel, we assume without loss of generality that the nodes of the dynamic networks we study in this section have been relabeled this way. As a result, the network matrix G can be written as a lower triangular matrix.
where some G ij , i > j are typically zero. In [12] it was shown that for a network matrix (4) with all G ij = 0 for i > j generic identifiability is achieved if and only if all sources are excited, all sinks are measured, and every other node is both excited and measured. Exciting and measuring all internal nodes is of course a very strong condition; we shall explain in the next section why it occurs when all G ij = 0.
The following lemma establishes relationships between such network matrix G with the structure of a DAG and the corresponding I/O matrix T .
Lemma III.1. Let G be as in (4) and define T = (I − G) −1 . Then the following relationships hold.
In the sequel of this paper we shall illustrate all our results with the following 7-node DAG. For this network, equation (10) allows us, for example, to write: Equations (9)-(10) define the expressions of the G ij recursively as a function of the T ij and of the previously computed G kl . But the G ij can also be expressed explicitly as functions of the T ij as is shown in the following Theorem, which is one of the main results of this paper. It shows that for DAGs one can compute the unknown transfer functions G ij explicitly as a function of the elements of the I/O matrix.
Theorem III.1. Define S ∆ = T −1 with elements S ij . Then the following results hold: (1) G lj = −S lj , and hence S lj = 0 for each pair {l, j}, l = j, for which G lj is known to be zero; (2) G lj can be written as a sum of products of T ki with k ≤ l and i ≥ j.
Proof. Item (1) follows from G = I −T −1 and the fact that the inverse of a lower triangular matrix with 'ones' on its diagonal is a lower triangular matrix with 'ones' on its diagonal. Item (2) (in particular the fact that T −1 does not contain any T −1 ij ) is a property of the inverse of a lower triangular matrix with 'ones' on its diagonal. It follows from the direct computation of T −1 , but it also follows by substituting the G ij on the right hand side of (10) by their expressions computed from the same equation.
To illustrate the result (2) of Theorem III.1, we observe that if we substitute G 53 and G 43 in the expression of G 73 above by their expressions, we obtain Not only does Theorem III.1 provide an explicit expression for the G lj as a function of the input-output elements T lk but it also proves very useful to establish relations among the T lk . Indeed, for each G lj that is known to be zero, result (2) of the Theorem allows one to compute one of the T lk as a function of others. This may then allow one to eliminate the need for the excitation or measurement of some nodes as we shall show in Section V. Returning again to the 7-node DAG of Figure 1, since G 52 = 0, it follows that S 52 = 0, which implies T 52 = T 53 T 32 + T 54 T 42 + T 54 T 43 T 42 .

IV. NECESSARY CONDITIONS FOR THE IDENTIFICATION OF A DAG
It was shown in [10] that a necessary condition for the generic identifiability of any network is that all sources must be excited, all sinks must be measured, and that each other node must be either excited or measured. Here we show that, for DAGs, some additional necessary conditions are required for two special classes of nodes, namely the dources and the dinks that were defined in Section II. Our main result is the following.
Theorem IV.1. Consider a dynamic network with the topology of a directed acyclic graph whose network matrix is given in (4) with some known G ij = 0 for i > j. Then this network is generically identifiable only if the following conditions hold.
(1) each node is either excited or measured; (2) all sources are excited and all sinks are measured; (3) all dources are excited and all dinks are measured. (1) and (2) have been shown to be necessary for the idenfication of any network in [10]. We turn to item (3). We first prove that the excitation of all dources is necessary. Consider a node l that is an outneighbor of i such that all in-neighbors of node i are connected to that outneighbor l. This means that node i is a dource. It then follows that for each in-neighbor j of node i, we have • G ij = 0 since j is an in-neighbor of i; • G lj = 0 by the assumption above.

Proof. Conditions
To show that the dource i needs to be excited, we focus on the transfer function T li between the dource i and the outneighbor l that is connected to all in-neighbors of i. It follows from (10) that in the equations defining the G ij as a function of the T lk and the other G ij , this specific transfer function T li appears only in the expressions of G lj in which l is the considered out-neighbor of dource i, and j is either the dource i itself or one of its N − i in-neighbors. We now observe that in these 1 + N − i equations, T li is either multiplied by '1' or by the G ij that relate the in-neighbors of dource i to itself. These G ij are nonzero (see above). Each of these equations 1 + N − i equations therefore contains an unknown G lj on the left hand side and the unknown T li on the right hand side. Hence node i must be excited in order to compute T li and therefore the edges G lj linking the dource i and all its in-neighbors to this particular out-neighbor. The proof for the necessity of measuring all dinks is the exact dual of the proof for the necessity of excting all dources and will therefore be omitted.
We illustrate the result of Theorem IV.1 with the 7-node DAG network pictured in Figure 1. This network has one source (node 1), two dources (nodes 2 and 5), two sinks (nodes 6 and 7) and one dink (node 4).
We first show why node 5 must be excited. It is a dource because all its in-neighbors (nodes 3 and 4) are connected to out-neighbor 7. We write the equations (10) that relate the out-neighbor to the dource and to its two in-neighbors.
We observe that, even if all quantities other than T 75 on the right hand side were known (i.e. T 74 , T 73 , G 54 , G 43 , G 53 ), it would be impossible to identify the transfer functions G 75 , G 74 and G 73 without knowing T 75 , which requires exciting node 5. We add that, if an edge G 76 was added, the first equation would be replaced by G 75 = T 75 − G 76 T 65 , and the conclusion would thus be identical.
We now illustrate why node 4 must be measured. It is a dink because it has an in-neighbor (node 3) that is connected to all its out-neighbors (nodes 5 and 7). We write the equations (9) that relate its in-neighbor 3 to the dink and to all its outneighbors.
We observe that T 43 is required to compute G 43 , and that it cannot be computed from the other two equations for the same reasons as above. Thus, node 4 must be measured for the identification of G 43 , G 53 and G 73 .
Notice that a given node can be both a dource and a dink. In a "full" DAG as in (4), with all G ij = 0, all internal nodes are dources and dinks, which explains the need for exciting and measuring them all, as shown in [12].

V. CONSTRUCTING A VALID EMP FOR A DAG
In this section, we show how to construct a valid EMP while trying to keep the cardinality of this EMP low. Recall that this cardinality is always between n and 2n − f − s.
An easy solution for the construction of a valid EMP results from Theorem III.1. Indeed, each G ij can be expressed explicitly as a combination of T kl . The collection of all these T kl indicates which node excitations and which node measurements will lead to a valid EMP. In order to reduce the cardinality of this explicit solution, one can, in a second step, take advantage of the possible replacement of some of these T kl by others using the equations S ij = 0 for each G ij that is known to be zero: see item (1)  Collecting all the indices that appear as inputs and outputs of the T kl yields the valid EMP B = {1, 2, 3, 4, 5} and C = {2, 3, 4, 5, 6, 7}. It has cardinality 10. Observe that nodes 2, 3, 4, 5 are both excited and measured. According to Theorem IV.1, nodes 2 and 5 are dources and node 4 is a dink. Hence, nodes 2 and 5 must be excited, as well as node 1, which is a source; while node 4 must be measured, as well as nodes 6 and 7 which are sinks. Starting from this initial EMP with cardinality 10, one can then use the equations of Theorem III.1 and Lemma III.1 (in particular the equations S ij = 0) to check whether one can eliminate any one of nodes 3 and 4 from B, or any one of nodes 2, 3, 5 from C. However, such procedure is tedious, and there appears to be no systematic way to proceed with the elimination of excitations or measurements. Therefore, we propose a recursive procedure for the construction of a valid EMP which is based on Theorem III.1 and Lemma III.1.
Recursive procedure for the construction of a valid EMP. First build the matrix S, replacing each S lj by −G lj , where these G lj are computed using equation (10) of Lemma III.1. For each G lj that is known to be zero, equate the zero element in S ji to the expression resulting from the same equation (10). Now construct the preliminary EMP with the excitations and measurements required by the structure of the DAG: sources and dources must be excited, dinks and sinks must be measured. Call it EMP 0 , thus defining a B 0 and a C 0 . List the corresponding known T ij , i.e. all T ij for which j ∈ B 0 and i ∈ C 0 . Now proceed stepwise within the columns of S, say from column 1 to column n, as explained below.
1) Column 1: the unknown G j1 appear in the first column of S. Add to EMP 0 whatever excited node or measured node is required to be able to identify all G j1 . There may be several choices. Use the remaining S j1 = 0 equations of column 1 to compute new elements T kl . Update EMP 0 to EMP 1 , update the known G j1 , and update the known T kl .
2) Column 2: the unknown G j2 appear in the second column of S. Add to EMP 1 whatever excited node or measured node is required to be able to identify all G j2 . There may be several choices. Use the remaining S j2 = 0 equations of column 2 to compute new T kl . Update EMP 1 to EMP 2 , update the known G j2 , and update the known T kl .
3) Continue until all columns of S containing elements G lj have been covered.
Before we illustrate this procedure with our Example, let us make the following comments. Comments • The computation of elements G lj based on column j of S may require that several elements of that column be used jointly, leading to the solution of a linear system of equations. One must check that these equations are linearly independent. • The procedure proposed above uses a column by column approach, going from left to right. Other approaches can be used, such as covering the columns from right to left, using a row by row approach, etc. These different approaches will typically lead to different valid EMPs.
The EMP procedure applied to the DAG of Figure 1.
For this example, we know a priori that nodes 1, 2 and 5 must be excited, being a source and two dources, while nodes 4, 6 and 7 must be measured, being a dink and two sinks. As a result, the starting EMP, denoted EMP 0 above, is E125, M467. With this initial EMP 0 , the elements T 41 , T 42 , T 61 , T 62 , T 65 , T 71 , T 72 , T 75 are known.
In Table I describing the procedure, we have listed the a priori information as being in column 0. We observe that the elements of column 1 can be identified by the addition of M23, i.e. the measurement of nodes 2 and 3. It turns out that with this addition of M23, all other elements G lj can subsequently be computed, and the procedure ends with a valid EMP defined as E125, M23467, which has cardinality 8.
An alternative is to add E3 for the identification of the elements of column 1, and E4 for the identification of the elements of column 2. This yields the alternative valid EMP defined as E12345, M467, with the same cardinality 8. A row by row procedure, from top to bottom, applied to the same example leads to the valid EMP: E125, M234567, which has cardinality 9. In comparison, the explicit solution based on the decomposition of each G lj as a function of the T kl only, as explained above, has cardinality 10.

VI. CONCLUSIONS
We have pursued our study of specific substructures of dynamic networks, with the aim of designing EMPs that guarantee identifiability for these specific substructures. In [5] a necessary and sufficient condition was established for trees, with a corresponding valid (and minimal) EMP. In [12] necessary and sufficient conditions for network structures with parallel paths were derived. In [13] it was shown that any loop with more than 3 nodes can also be identified with a minimal EMP and the design of such loops was presented. In the present paper we have focused on networks that have the structure of a DAG. We have shown that DAGs have specific properties which facilitate the design of valid EMPs. A rather surprising result of our analysis has been to show that two specific and well-defined nodes, which we have called dources and dinks, have specific excitation and measurement requirements. Dources, just like sources, must be excited and dinks, just like sinks, must be measured in order for a DAG network to be identifiable. With these constraints under our belt, we have produced a recursive EMP design procedure that takes advantage of the properties of DAGs.