Appropriate time to apply control input to complex dynamical systems

Controlling a network structure has many potential applications many fields. In order to have an effective network control, not only finding good driver nodes is important, but also finding the optimal time to apply the external control signals to network nodes has a critical role. If applied in an appropriate time, one might be to control a network with a smaller control signals, and thus less energy. In this manuscript, we show that there is a relationship between the strength of the internal fluxes and the effectiveness of the external control signal. To be more effective, external control signals should be applied when the strength of the internal states is the smallest. We validate this claim on synthetic networks as well as a number of real networks. Our results may have important implications in systems medicine, in order to find the most appropriate time to inject drugs as a signal to control diseases.

www.nature.com/scientificreports/ agree or disagree to alterations in a particular subject within a population, thereby within their various communications, it is critical to find the best time when one can input the signals into the network. In this manuscript, we propose a methodology to determine the optimal time to apply the external inputs to driver nodes. We apply the proposed method on some real networks and reveal its effectiveness.

Results
States of individual nodes in complex dynamical network systems often undergo continuous changes based on their interactions with other nodes. Our aim is to find the best time that an external input can be applied to nodes in order to have maximum control impact. Our methodology is based on the connection between the strength of the system's internal fluxes and the effect of the external signals on the system. As an external signal is applied to the network, the existing interaction between network nodes and the adjacent systems is ignored and only the network's internal connections are taken into account in order to calculate the study the relation between the strength of internal fluxes and effect of the external control. Let's consider a directed network G with n nodes with equations of motion described by the where A is the connectivity matrix between the nodes, X is the state vector, U is the input vector and B determines the driver nodes to which the external input should be applied. The solution to the above equation will be if there are not any external signals, and if the external signals are applied to the network 40 .
In the Methods section, we prove a theorem which specifies that the maximum effect of input signals to control a system will be produced when the system's internal fluxes are weak. A dynamical system will have strong internal fluxes when it is not in a steady-state mode or when the equilibrium of the system could be related to the positive and negative signals that are balanced. In such case, external control signals often have minimal effect on the system's performance. Our proposed method is based on this principle.
Let's denote the network internal signals of nodes by h(t). This function is differentiable at every point, when the left-and right-hand derivatives are equal, and the derivative is the degree of stimulation or the tendency for the movement of state of node. We know that the derivative of a function is zero if and only if the function is positioned at the extremum points, where the systems is its steady-state. The strength of the input signals is a function of the extent of movement in the preequilibrium, the duration of the stay in the equilibrium and the network structure.
To evaluate the above idea, here we present evidence on both synthetic and real networks. We compute the relationship between the strength of network's internal fluxes and the degree of the effectiveness of external input signals on the network. Negative correlation coefficient between the strength of the internal fluxes and the effect of the external inputs denotes an inverse association between them. Our results show that when the strength of internal fluxes is high, the impact of external input signals on the network will be low, and vice versa.
As shown below, the functions f (t) and g(t) , respectively, are employed to measure the strength of internal network fluxes and the degree of the effectiveness of external signals. The function f (t) determines the sum of the derivatives of the states at time t by applying the following equation: where n is the number of nodes and Re and Im are the real and imaginary parts of the complex number, respectively. The function g(t) is obtained from the following equation: where Z(t + m) specifies the state of the nodes without applying the external signals to the system after m steps, and Y (t + m) determines the state of the nodes by applying the signals to the system at time t after m steps.
Based on the states obtained in the previous step and the available signals, the state of network nodes is obtained as: In order for the matrices M and A to be invertible, det(A) = 0, and A must have n distinct eigenvalues. Figure 1 represents a topy network. We take the initial states of the nodes as [1, 1, 1, 1, 1] T and the time intervals as t = 1 to 20 . At times t = 1, 5, 10, 15, and 20, a signal with the value of 1 is applied to the nodes of the network. Thus, the amount of internal fluxes of the network at t = 1, 5, 10, 15 and, 20 will be high; otherwise it will be low (blue curves). At any specific time, different input signals are applied to the network, and the correlation coefficient between f and g is calculated. There exist two strategies for applying the signal at time t. In the first strategy, the signal is applied at the first step, and there are not any signals in the next m-1 steps. While in the other strategy, a continuous signal with a length of m is applied to the network. The value of m is 5 or 20.
Results on synthetic networks. A directed network G(A) (with 100 nodes), in which A has 100 distinct eigenvalues and det(A) = 0, was randomly generated with different average degrees of 10, 25 and 50. To prevent an increased state of the network, the weight of edges was considered ±0.01, and the state of each node was initially set one. Then, an interval with 100 steps was considered, and signals with size 1 were applied to the network at times 0, 20 ,40, 60, 80 and 100. Based on the algorithm that we have provided in order to find the driver nodes with the minimal mediator nodes 15 , the network driver nodes are specified and then applied these signals to either (i) all nodes, or (ii) only driver nodes. At any time from 1 to 100, signals with different sizes ( U = −100, −10, −1, −0.1, 0.1, 1, 10, 100 ) were applied to the network. Then, the correlation coefficient between f and g was calculated based on both the single and continuous signals (m = 5 and 20). Figure 2 shows f and g in a sample network with an average degree of 10, and when an input signal with a value of − 100 was applied to all nodes in 20 consecutive steps Figure 3 (Fig. 4) show the correlation coefficient between f and g when the input signals are applied to all (driver) nodes. It is seen that when the control is applied to all nodes, the correlation takes a larger absolute value than the case when the control is applied to only driver nodes. Furthermore, as the network become denser (i.e. their average degree increases), the correlation becomes stronger.
Results on real networks. Like the previous section, the correlation coefficient between f and g at the given time intervals was calculated under different settings. The results obtained from U = ±1 were listed in Table 1 and those obtained from different sizes of U were presented in Fig. 5. The results obtained from different sizes of U show that the correlation coefficient between f and g is close to -1, except for the case of smallsize input signal ( U = ±0.1) . Similar to synthetic networks, the correlation is stringer when the input signal is applied to all nodes rather than only drivers, which is somehow expected. www.nature.com/scientificreports/

Conclusions
A dynamical network is controllable if the state of its nodes can be steered from any initial value to a desired final value in a finite time. Often, external control signals are applied to a number of select nodes, called drivers, to control the networks. In some applications, it is critical to apply in control signals in appropriate time(s) to obtain the maximum control performance. If control signals are applied in appropriate times, the network might be controlled with smaller control signals, and thus less energy. Therefore, one may optimize the energy required for the control. In this manuscript, we proposed a methodology to final the best times to apply the external control signals to network nodes. We showed that applying the external signals to the network is most efficient when the value of positive and negative internal fluxes of the system is small. Under this condition, there would be no opposite forces in the system, and thus even small control signals could be effective.

Methods
State-variable response of linear systems. In a network with dynamics of motion as Ẋ (t) = AX(t) + BU (t) , if there are not any external signals, the state of the nodes will be obtained from the equation: If an external signal is applied to the network, the state will be obtained using the following equation:      Figure 4. The correlation coefficient between two functions f and g when the input signal is applied to only drivers. Although the correlation is still negative, its absolute value is less compared to the case of applying the input signal to all nodes. Designations are as Fig. 3. Table 1. The table shows the Pearson correlation coefficient between f (the strength of internal network fluxes) and g (the degree of the effectiveness of external signals) in different measurement modes, when input signals of different sizes are applied. Definition of parameters: n is the number of nodes, L is the number of edges, U is the input signal applied to the network, which is considered to be 1 or − 1. The correlation coefficient between f and g is calculated in different settings as follows. including The input signal is applied to (W5C) all nodes in 5 Consecutive steps, (W20C) to all nodes in 20 Consecutive steps, (W5S) all nodes and the signal is applied at the first step and there are not any signals in the next 4 steps, (W20S) all nodes and the signal is applied at the first step and there are not any signals in the next 19 steps (D5C) the driver nodes in 5 Consecutive steps, (D20C) the driver nodes in 20 Consecutive steps, (D5S) the driver nodes and the signal is applied at the first step and there are not any signals in the next 4 steps, and (D20S) the driver nodes and the signal is applied at the first step and there are not any signals in the next 19 steps.   Table 1.