Fig. 2: Experimental setup and optimal data-driven network controls.

Panel (a) illustrates the data-collection process. With reference to the ith control experiment, a T-step input sequence \({{\bf{u}}}_{0:T}^{(i)}\) excites the network dynamics in Eq. (1), and the time samples of the resulting output trajectory \({{\bf{y}}}_{0:T}^{(i)}\) are recorded. The input trajectory \({{\bf{u}}}_{0:T}^{(i)}\) may be generated randomly, so that the final output \({{\bf{y}}}_{T}^{(i)}\) does not normally coincide with the desired target output yf. Red nodes denote the control or input nodes (forming matrix B) and the blue nodes denote the measured or output nodes (forming matrix C). Panel (b) shows a realization of the Erdös–Rényi graph model G(n, pedge) used in our examples, where n is the number of nodes, pedge is the edge probability. We set the edge probability to \({p}_{\text{edge}}=\mathrm{ln}\,n/n+\varepsilon\), ε = 0.05, to ensure connectedness with high probability, and normalize the resulting adjacency matrix by \(\sqrt{n}\). Panel (c) shows the value of the cost function (left) and the (norm of the) error in the final state (right) for the data-driven input (4) and the model-based control as a function of the number of data points. The symbol yf denotes the desired final target and \({\hat{{\bf{y}}}}_{\text{f}}\) the output reached by the (model-based or data-driven) control input. We choose Q = R = I, n = 1000, T = 10, m = 50, and p = 200, and consider Erdös–Rényi networks as in panel (b). For additional details, see “Methods”.